From 43d759c5c5d560f9ac28a02e09c41b01c7be2935 Mon Sep 17 00:00:00 2001 From: Bob Sun Date: Thu, 9 Feb 2017 13:52:49 +0800 Subject: [PATCH] Use SFSafariViewController to show about pages --- pass/Controllers/BasicStaticTableViewController.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pass/Controllers/BasicStaticTableViewController.swift b/pass/Controllers/BasicStaticTableViewController.swift index 85949d9..f74251a 100644 --- a/pass/Controllers/BasicStaticTableViewController.swift +++ b/pass/Controllers/BasicStaticTableViewController.swift @@ -7,6 +7,7 @@ // import UIKit +import SafariServices enum CellDataType { case link, segue, empty @@ -65,8 +66,9 @@ class BasicStaticTableViewController: UITableViewController { let link = cellData[CellDataKey.link] as? String performSegue(withIdentifier: link!, sender: self) case .link: - let link = cellData[CellDataKey.link] as? String - UIApplication.shared.open(URL(string: link!)!, options: [:], completionHandler: nil) + let link = cellData[CellDataKey.link] as! String + let svc = SFSafariViewController(url: URL(string: link)!, entersReaderIfAvailable: true) + self.present(svc, animated: true, completion: nil) default: break }