url 받아서 브라우저로 열기
objc:
Handle completionHandler
UIApplication *application = [UIApplication sharedApplication];
NSURL *URL = [NSURL URLWithString:@"http://www.google.com"];
[application openURL:URL options:@{} completionHandler:^(BOOL success) {
if (success) {
NSLog(@"Opened url");
}
}];
Without handling completionHandler
[application openURL:URL options:@{} completionHandler:nil];