Instance Method

initWithFrame:

Returns an NSControl object initialized with the specified frame rectangle.

Declaration

- (instancetype)initWithFrame:(NSRect)frameRect;

Parameters

frameRect

The rectangle of the control, specified in points in the coordinate space of the enclosing view.

Return Value

An initialized control object, or nil if the object could not be initialized.

Discussion

If a cell has been specified for controls of this type, this method also creates an instance of the cell. Because NSControl is an abstract class, invocations of this method should appear only in the designated initializers of subclasses; that is, there should always be a more specific designated initializer for the subclass, as this method is the designated initializer for NSControl.

See Also

Creating a Control