Index

RBSwitchField.h

Classes


RBSwitchField

A managed UISwitch with an optional label.

Properties

The margin around the UISwitch view.
public margin UIEdgeInsets { get set }

The spacing between the UISwitch view and it's label (if there is one).
public spacing CGFloat { get set }

The tint color when the switch is on.
public onTintColor UIColor? { get set }

The tint color of the switch.
public tintColor UIColor { get set }

The tint color of the thumb of the switch.
public thumbTintColor UIColor? { get set }

The image to display when the switch is on.
public onImage UIImage? { get set }

The image to display when the switch is off.
public offImage UIImage? { get set }

The label text to display next to the switch.
public labelText NSString? { get set }

Whether to display the label to the left or the right of the switch.
public labelAlignment RBHorizontalAlignment { get set }

Gets or sets whether the switch is on.
public on Bool { get set }

Functions

Updates the switch's state with an animation.
@param on : Whether the switch should be turned on (true) or off (false).
@param animated : Whether or not the transition should be animated.
- (void)setOn:(BOOL)on animated:(BOOL)animated;