Tutorial by Examples

You should implement SFSafariViewControllerDelegate so that your class is notified when the user hits the Done button on the SafariViewController and you can dismiss it as well. First declare your class to implement the protocol. class MyClass: SFSafariViewControllerDelegate { } Implement th...
You can add items to a user's Reading List in Safari by calling the addItem method on the SSReadingList singleton. let readingList = SSReadingList.default() readingList?.addItem(with: yourURL, title: "optional title", previewText: "optional preview text") The default Reading...
Don't forget to import the necessary framework first. import SafariServices //Objective-C @import SafariServices; Instantiate a SafariViewController instance. let safariVC = SFSafariViewController(URL: URL(string: "your_url")!) //Objective-C @import SafariServices; NSURL *URL = [...

Page 1 of 1