Initializer

init(frame:)

Returns an initialized switch object.

Declaration

init(frame: CGRect)

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 init(frame:) and enforces a size appropriate for the control.

See Also

Initializing the Switch Object