Last active
June 8, 2018 11:38
-
-
Save paulw11/d02d2ca6dd77ed543d4e4cd16567eb02 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let url = URL(string: "https://www.agoda.com/pages/agoda/default/DestinationSearchResult.aspx?pcs=1&cid=1807795&hl=en&city=16594") { | |
UIApplication.shared.open(url, options: [:], completionHandler: nil) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import "ViewController.h" | |
@interface ViewController () | |
@end | |
@implementation ViewController | |
- (void)viewDidLoad { | |
[super viewDidLoad]; | |
// Do any additional setup after loading the view, typically from a nib. | |
} | |
-(void)viewDidAppear:(BOOL)animated { | |
[super viewDidAppear:animated]; | |
NSURL *url = [NSURL URLWithString:@"https://www.agoda.com/pages/agoda/default/DestinationSearchResult.aspx?pcs=1&cid=1807795&hl=en&city=16594"]; | |
if (url != nil) { | |
[[UIApplication sharedApplication] openURL:url options:@{} completionHandler:nil]; | |
} | |
} | |
- (void)didReceiveMemoryWarning { | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment