I have an integer that holds an amount of bytes. How would I make a function that returns an NSString with a value of kb or mb depending on what is appropriate.
So if the value of bytes is over 1024 show in KB and if its over 1024 KB show it in MB. Also I need it to round to one decimal place.
Examples: 55803 returns @"54.5 KB" 3671316 returns @"3.5 MB" 362 returns @"362 B" <- No decimals if in bytes :p