tags:

views:

28

answers:

2

Hello,

Im trying to get the amont of data downloaded with this - (void)download:(NSURLDownload *)theDownload didReceiveDataOfLength:(NSUInteger)length code from apples website but I need to convert the length to a string. How might I do this? Thanks in advance

+1  A: 

Just create a string if you need a string:

NSString *lengthString = [NSString stringWithFormat:@"%u", length];
Carl Norum
Thanks but when I run the code I just get the error: “EXC_BAD_ACCESS”. Any ideas on whats causing this?
happyCoding25
Sorry, I missed a `@` there. Try again with my edited change.
Carl Norum
Oh okay thanks for your help. It works perfectly. I cant believe I missed that.
happyCoding25
A: 

Can't you do NSString* stringLength = [NSString stringWithFormat: @"%u", length];?

Calvin L