Var sfViewController = new SFSafariViewController(url, config) Īpple has also made updates to privacy in the Safari View Controller in iOS 11. This is enabled by setting the new BarCollapsedEnabled property to false: var config = new SFSafariViewControllerConfiguration() This value can be changed while SFSafariViewController is presented.ĭepending on the content that is displayed inside a Safari View Controller, it might be necessary to ensure that the menu bars don't collapse as the user scrolls. The Dismiss button presented in the Safari View Controller can also be changed by setting the DismissButtonStyle property to either Done, Close, or Cancel: sfViewController.DismissButtonStyle = SFSafariViewControllerDismissButtonStyle.Close The following code snippet renders the bars in purple and white, as displayed in the following image: You can also customize the color scheme to fit in with the color scheme of your app by setting the preferredBarTintColor and PreferredControlTintColor properties: sfViewController.PreferredControlTintColor = UIColor.White For example, the removal of the address bar now gives the Safari View Controller the feel of an in-app browser, rather than a mini-browser. IOS 11 has introduced style updates to the Safari View Controller, giving your users a more seamless experience between an app and the web. More information on its features can be found in the Web Views guide. SFSafariViewController was introduced in iOS 9 as an option for displaying web content or authenticating users from your app. IOS 11 introduces a new version of the Safari web browser – Safari 11.0 – which includes changes to WebKit and SafariServices.
0 Comments
Leave a Reply. |