Created
June 9, 2016 14:20
-
-
Save vikdenic/d17109476f1920765fc40fa857c1beac to your computer and use it in GitHub Desktop.
Safari stuff
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 SafariServices | |
| extension MainViewController: FlippedViewDelegate, SFSafariViewControllerDelegate { | |
| func didTapTicketsButton(button: UIButton) { | |
| if #available(iOS 9.0, *) { | |
| let svc = SFSafariViewController(URL: NSURL(string: kURLTickets)!) | |
| svc.delegate = self | |
| popup!.dismiss(true) | |
| self.presentViewController(svc, animated: true, completion: nil) | |
| // Fallback on earlier versions | |
| } else { | |
| UIApplication.sharedApplication().openURL(NSURL(string: kURLTickets)!) | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment