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

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -