I’m looking for a "did finish, or finish" thing in NSURL -> NSstring initWithContentsOfUrl
I found "URLResourceDidFinishLoading" but this seems to be depreciated
I couldn’t find any but maybe I searched for the wrong thing.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re talking about
-initWithContentsOfURL:fromNSString, it has been deprecated.But even if you are using it, it’s a synchronous method – meaning your code will halt until the data has been loaded into the resulting
NSStringobject:So, just to be clear: this is a bad practice for two reasons:
What you need is probably
NSURLRequestto create your request object andNSURLConnectionto actually load it from the network.