The following method causes the code to break, why is this? what is unique about an NSURL that they can’t implicitly convert from NSString?
- (void)followLink
{
[[UIApplication sharedApplication]openURL:@"http://www.google.com"];
}
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.
Because you’re passing
NSStringto the method that expectsNSURLas parameter. To fix your problem create url object from your string: