I am trying to NSLog the number of megs my NSData object is however currently all I can get is bytes by using
NSLog
NSData
NSLog(@\"%u\", myData.le
For Swift 3, in Mb:
let countBytes = ByteCountFormatter() countBytes.allowedUnits = [.useMB] countBytes.countStyle = .file let fileSize = countBytes.string(fromByteCount: Int64(dataToMeasure!.count)) print("File size: \(fileSize)")