Instance Method

initWithFrame:configuration:

Returns a web view initialized with a specified frame and configuration.

Declaration

- (instancetype)initWithFrame:(CGRect)frame configuration:(WKWebViewConfiguration *)configuration;

Parameters

frame

The frame for the new web view.

configuration

The configuration for the new web view.

Return Value

An initialized web view, or nil if the object could not be initialized.

Discussion

This is a designated initializer that accepts a custom WKWebViewConfiguration. The initializer copies the specified configuration. Changing the configuration object after initializing the web view has no effect on the web view. You can use the initWithFrame: method to initialize an instance with the default configuration. See WKWebViewConfiguration for default values.

See Also

Initializing a Web View

configuration

A copy of the configuration to initialize the web view with.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software