init(url:configuration:)
Initializes and configures a Safari view controller that loads the specified URL.
Declaration
init(url URL: URL, configuration: SFSafariViewController.Configuration)Parameters
- URL:
The URL to navigate to. The URL must use the
httporhttpsscheme. - configuration:
The configuration for the new view controller.
Return Value
A newly created Safari view controller.
Discussion
Use init(url:) to initialize an instance with the default configuration. The initializer copies the specified SFSafariViewController.Configuration object, so mutating the configuration after invoking the initializer has no effect on the view controller.