From 06c06fda721c576a29ca3480ba20bb8995b21d8e Mon Sep 17 00:00:00 2001 From: Wisdom Arerosuoghene Date: Sat, 18 May 2019 01:42:23 +0100 Subject: [PATCH] correct SFSafariViewController usage --- Decred Wallet/view_controller/HelpViewController.swift | 7 +------ Decred Wallet/view_controller/SendViewController.swift | 7 +------ .../TransactionFullDetailsViewController.swift | 6 +----- 3 files changed, 3 insertions(+), 17 deletions(-) diff --git a/Decred Wallet/view_controller/HelpViewController.swift b/Decred Wallet/view_controller/HelpViewController.swift index cce43bc91..f28b86e6e 100644 --- a/Decred Wallet/view_controller/HelpViewController.swift +++ b/Decred Wallet/view_controller/HelpViewController.swift @@ -33,12 +33,7 @@ class HelpViewController: UIViewController,SFSafariViewControllerDelegate { func openLink(urlString: String) { if let url = URL(string: urlString) { - var viewController: SFSafariViewController - if #available(iOS 11.0, *) { - viewController = SFSafariViewController(url: url) - } else { - viewController = SFSafariViewController(url: url, entersReaderIfAvailable: true) - } + let viewController = SFSafariViewController(url: url) viewController.delegate = self as SFSafariViewControllerDelegate self.present(viewController, animated: true) diff --git a/Decred Wallet/view_controller/SendViewController.swift b/Decred Wallet/view_controller/SendViewController.swift index 71d7aaa2d..381bbb83b 100644 --- a/Decred Wallet/view_controller/SendViewController.swift +++ b/Decred Wallet/view_controller/SendViewController.swift @@ -518,12 +518,7 @@ class SendViewController: UIViewController, UITextFieldDelegate,UITextPasteDeleg func openLink(urlString: String) { if let url = URL(string: urlString) { - var viewController: SFSafariViewController - if #available(iOS 11.0, *) { - viewController = SFSafariViewController(url: url) - } else { - viewController = SFSafariViewController(url: url, entersReaderIfAvailable: true) - } + let viewController = SFSafariViewController(url: url) viewController.delegate = self as? SFSafariViewControllerDelegate self.present(viewController, animated: true) diff --git a/Decred Wallet/view_controller/TransactionFullDetails/TransactionFullDetailsViewController.swift b/Decred Wallet/view_controller/TransactionFullDetails/TransactionFullDetailsViewController.swift index c3d17bcb8..bdb01655c 100644 --- a/Decred Wallet/view_controller/TransactionFullDetails/TransactionFullDetailsViewController.swift +++ b/Decred Wallet/view_controller/TransactionFullDetails/TransactionFullDetailsViewController.swift @@ -297,11 +297,7 @@ class TransactionFullDetailsViewController: UIViewController, UITableViewDataSou func openLink(urlString: String) { if let url = URL(string: urlString) { var viewController: SFSafariViewController - if #available(iOS 11.0, *) { - viewController = SFSafariViewController(url: url) - } else { - viewController = SFSafariViewController(url: url, entersReaderIfAvailable: true) - } + let viewController = SFSafariViewController(url: url) viewController.delegate = self as SFSafariViewControllerDelegate self.navigationController?.pushViewController(viewController, animated: true) }