Initializer

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 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.

See Also

Creating Instances

func prepareForReuse()

Restores the view to an initial state so that it can be reused.