objective c - Convert NSData to a NSURL -


i have seen done other way. have nsdata object returned suppose url of image file.

how do convert nsdata object nsurl?

thanks

you first need convert nsdata object nsstring object , can create nsurl new string.

 nsstring *urlstring = [[nsstring alloc] initwithdata:mydata encoding:nsutf8stringencoding]; // or other appropriate encoding  nsurl *url = [[nsurl alloc] initwithstring:[urlstring autorelease]]; 

Comments

Popular posts from this blog

php - How can I edit my code to echo the data of child's element where my search term was found in, in XMLReader? -

iphone - Using nested NSDictionary with Picker -

javascript - Iterate over array and calculate average values of array-parts -