Instance Method

initWithURL:configuration:

Initializes and configures a Safari view controller that loads the specified URL.

Declaration

- (instancetype)initWithURL:(NSURL *)URL configuration:(SFSafariViewControllerConfiguration *)configuration;

Parameters

URL

The URL to navigate to. The URL must use the http or https scheme.

configuration

The configuration for the new view controller.

Return Value

A newly created Safari view controller.

Discussion

Use initWithURL: to initialize an instance with the default configuration. The initializer copies the specified SFSafariViewControllerConfiguration object, so mutating the configuration after invoking the initializer has no effect on the view controller.

See Also

Creating a View Controller

SFSafariViewControllerConfiguration

A configuration object that defines how a Safari view controller should be initialized.

- initWithURL:

Initializes a Safari view controller that loads the specified URL.

- initWithURL:entersReaderIfAvailable:

Initializes a Safari view controller that will load the specified URL, entering Reader mode if Reader mode is requested and available.

Deprecated