Skip to content

Instantly share code, notes, and snippets.

@paulw11
Last active June 8, 2018 11:38
Show Gist options
  • Save paulw11/d02d2ca6dd77ed543d4e4cd16567eb02 to your computer and use it in GitHub Desktop.
Save paulw11/d02d2ca6dd77ed543d4e4cd16567eb02 to your computer and use it in GitHub Desktop.
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)
}
#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