Skip to content

Commit

Permalink
Merge pull request #203 from CristiHabliuc/about-screen
Browse files Browse the repository at this point in the history
Reader for Privacy Policy
  • Loading branch information
CristiHabliuc authored Sep 23, 2020
2 parents 202e819 + e91c8a6 commit d586bdd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion MonitorizareVot/Settings/AboutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,14 @@ class AboutViewController: MVViewController {

@IBAction func handlePolicyTap(_ sender: Any) {
if let url = model.privacyPolicyUrl {
let safariViewController = SFSafariViewController(url: url)
var safariViewController: SFSafariViewController
if #available(iOS 11.0, *) {
let safariConfig = SFSafariViewController.Configuration()
safariConfig.entersReaderIfAvailable = true
safariViewController = SFSafariViewController(url: url, configuration: safariConfig)
} else {
safariViewController = SFSafariViewController(url: url)
}
self.present(safariViewController, animated: true, completion: nil)
} else {
let error = UIAlertController.error(withMessage: "No policy available")
Expand Down

0 comments on commit d586bdd

Please sign in to comment.