RBSwitchField Class Reference

Inherits from UIControl
Declared in RBSwitchField.h

Overview

A managed UISwitch with an optional label.

  margin

The margin around the UISwitch view.

@property (nonatomic) UIEdgeInsets margin

Discussion

The margin around the UISwitch view.

Declared In

RBSwitchField.h

  spacing

The spacing between the UISwitch view and it’s label (if there is one).

@property (nonatomic) CGFloat spacing

Discussion

The spacing between the UISwitch view and it’s label (if there is one).

Declared In

RBSwitchField.h

  onTintColor

The tint color when the switch is on.

@property (nonatomic, nullable) UIColor *onTintColor

Discussion

The tint color when the switch is on.

Declared In

RBSwitchField.h

  tintColor

The tint color of the switch.

@property (nonatomic, nonnull) UIColor *tintColor

Discussion

The tint color of the switch.

Declared In

RBSwitchField.h

  thumbTintColor

The tint color of the thumb of the switch.

@property (nonatomic, nullable) UIColor *thumbTintColor

Discussion

The tint color of the thumb of the switch.

Declared In

RBSwitchField.h

  onImage

The image to display when the switch is on.

@property (nonatomic, nullable) UIImage *onImage

Discussion

The image to display when the switch is on.

Declared In

RBSwitchField.h

  offImage

The image to display when the switch is off.

@property (nonatomic, nullable) UIImage *offImage

Discussion

The image to display when the switch is off.

Declared In

RBSwitchField.h

  labelText

The label text to display next to the switch.

@property (nonatomic, nullable) NSString *labelText

Discussion

The label text to display next to the switch.

Declared In

RBSwitchField.h

  labelAlignment

Whether to display the label to the left or the right of the switch.

@property (nonatomic) RBHorizontalAlignment labelAlignment

Discussion

Whether to display the label to the left or the right of the switch.

Declared In

RBSwitchField.h

  on

Gets or sets whether the switch is on.

@property (nonatomic, getter=isOn) BOOL on

Discussion

Gets or sets whether the switch is on.

Declared In

RBSwitchField.h

– setOn:animated:

Updates the switch’s state with an animation.

- (void)setOn:(BOOL)on animated:(BOOL)animated

Parameters

on

Whether the switch should be turned on (true) or off (false).

animated

Whether or not the transition should be animated.

Discussion

Updates the switch’s state with an animation.

Declared In

RBSwitchField.h