Send itms: to safari nstead of webview
I have the following code:
Webview *web = [[Webview alloc] initWithNibName:@"Webview" bundle:nil];
[web setModalPresentationStyle:UIModalTransitionStyle开发者_运维知识库CrossDissolve];
[self presentModalViewController:web animated:YES];
[web loadThisURL:[NSURL URLWithString:self.urlString]];
[web release];
I'd like to wrap that around an if statement, so that if urlString starts itms: then it should send the url to safari instead of webview. How would I write the if statement to check if it starts with itms?
Many Thanks!
Look at the documentation for the NSString
method hasPrefix:
.
精彩评论