Initializer

init(frame:)

Initializes and returns a newly allocated AppKit view with a specified frame rectangle.

Declaration

@objc override dynamic init(frame frameRect: NSRect)

Parameters

frameRect

The frame rectangle for the new view object.

Return Value

An initialized NSHostingView object or nil if the object couldn't be created.

Discussion

Use the init(rootView:) method to create your hosting view instead.

See Also

Creating a Hosting View

init(rootView: Content)

Creates a hosting view object that wraps the specified SwiftUI view.

init?(coder: NSCoder)

Creates a hosting view object from the contents of the specified archive.