forum

home / developersection / forums / how to convert nsdata length into mb in ios?

How to Convert NSData length into MB in iOS?

Anonymous User 7208 12-Jan-2016

Can anyone tell me how can I convert NSData length which is in bytes into  megabytes.
I want to print that value in NSLog() like this:

NSLog(@"Data length: %u MB", imageData.length);

above code will print bytes but I want to print length in MB.
for example: Data length: 8 MB

Please help me.


Updated on 13-Jan-2016

I am a content writter !

Can you answer this question?

Answer

1 Answers

Liked By