I am using SFSafariViewController to display app-related information (e.g. About, Support, T&C) from websites via the Settings view.
In the Settings view, there is a table with static cells. After implementing the following codes in the Settings View Controller, a view that resembles the Safari browser appears and the URL provided was loaded properly.
let url = URL(string: "https://google.com.au")
let svc = SFSafariViewController(url: url!)
self.present(svc, animated: true, completion: nil)
However, I didn't specify the action for the 'Done' button in the Navigation Bar. But it still dismissed the Safari browser view when it is tapped.
Question
Based on the tutorial here, I need to implement the SFSafariViewControllerDelegate protocol to dismiss the view controller.
I searched for some information in Apple's Documentation but couldn't find any information about the default behaviour for the 'Done' button.
- What is the default behaviour of the 'Done' button?
- Even though the 'Done' button is doing what I want it to (i.e. dismiss the view), should I still implement SFSafariViewControllerDelegate protocol?