Instance Method

initWithFrame:

Returns an initialized switch object.

Declaration

- (instancetype)initWithFrame:(CGRect)frame;

Parameters

frame

A rectangle defining the frame of the UISwitch object. The size components of this rectangle are ignored.

Return Value

An initialized UISwitch object or nil if the object could not be initialized.

Discussion

UISwitch overrides initWithFrame: and enforces a size appropriate for the control.

See Also

Initializing the Switch Object