init(frame:)
Initializes and returns a newly allocated NSView object with a specified frame rectangle.
Declaration
init(frame frameRect: NSRect)Parameters
- frameRect:
The frame rectangle for the created view object.
Return Value
An initialized view or nil if AppKit couldn’t create the object.
Discussion
Insert the view into your window’s view hieararchy before you can do anything with it. This method is the designated initializer for the NSView class.
See Also
Related Documentation
addSubview(_:positioned:relativeTo:)frameaddSubview(_:)- View Programming Guide