diff --git a/iOS/Settings/Settings.storyboard b/iOS/Settings/Settings.storyboard index 8bc23dfb0..90bf18be9 100644 --- a/iOS/Settings/Settings.storyboard +++ b/iOS/Settings/Settings.storyboard @@ -229,9 +229,26 @@ - + + + + + + + + + + + + @@ -247,7 +264,7 @@ - + @@ -264,7 +281,7 @@ - + @@ -281,7 +298,7 @@ - + @@ -478,7 +495,7 @@ - + @@ -593,7 +610,7 @@ - + diff --git a/iOS/Settings/SettingsViewController.swift b/iOS/Settings/SettingsViewController.swift index 6e0f3ae05..0a703d174 100644 --- a/iOS/Settings/SettingsViewController.swift +++ b/iOS/Settings/SettingsViewController.swift @@ -8,6 +8,7 @@ import UIKit import Account +import SafariServices class SettingsViewController: UITableViewController { @@ -135,17 +136,19 @@ class SettingsViewController: UITableViewController { let timeline = UIStoryboard.settings.instantiateController(ofType: AboutViewController.self) self.navigationController?.pushViewController(timeline, animated: true) case 1: - UIApplication.shared.open(URL(string: "https://ranchero.com/netnewswire/")!, options: [:]) + openURL("https://ranchero.com/netnewswire/") case 2: - UIApplication.shared.open(URL(string: "https://github.com/brentsimmons/NetNewsWire")!, options: [:]) + openURL("https://github.com/brentsimmons/NetNewsWire/blob/master/Technotes/HowToSupportNetNewsWire.markdown") case 3: - UIApplication.shared.open(URL(string: "https://github.com/brentsimmons/NetNewsWire/issues")!, options: [:]) + openURL("https://github.com/brentsimmons/NetNewsWire") case 4: - UIApplication.shared.open(URL(string: "https://github.com/brentsimmons/NetNewsWire/tree/master/Technotes")!, options: [:]) + openURL("https://github.com/brentsimmons/NetNewsWire/issues") case 5: + openURL("https://github.com/brentsimmons/NetNewsWire/tree/master/Technotes") + case 6: addFeed() default: - UIApplication.shared.open(URL(string: "https://ranchero.com/netnewswire/")!, options: [:]) + break } default: break @@ -286,4 +289,10 @@ private extension SettingsViewController { } + func openURL(_ urlString: String) { + let vc = SFSafariViewController(url: URL(string: urlString)!) + vc.modalPresentationStyle = .pageSheet + present(vc, animated: true) + } + }