Returns a web view initialized with a specified frame and configuration.
SDKs
- iOS 8.0+
- macOS 10.10+
Framework
- Web
Kit
Declaration
init(frame: CGRect, configuration: WKWeb View 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 WKWeb
. 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 init(frame:)
method to initialize an instance with the default configuration. See WKWeb
for default values.