Initializes and returns a newly allocated NSView
object with a specified frame rectangle.
SDK
- macOS 10.0+
Framework
- App
Kit
Declaration
init(frame frameRect: NSRect)
Parameters
frameRect
The frame rectangle for the created view object.
Return Value
An initialized NSView
object or nil if the object couldn't be created.
Discussion
The new view object must be inserted into the view hierarchy of a window before it can be used. This method is the designated initializer for the NSView
class. Returns an initialized object.