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

Declared In

RBSwitchField.h

  spacing

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

@property (nonatomic) CGFloat spacing

Declared In

RBSwitchField.h

  onTintColor

The tint color when the switch is on.

@property (nonatomic, nullable) UIColor *onTintColor

Declared In

RBSwitchField.h

  tintColor

The tint color of the switch.

@property (nonatomic, nonnull) UIColor *tintColor

Declared In

RBSwitchField.h

  thumbTintColor

The tint color of the thumb of the switch.

@property (nonatomic, nullable) UIColor *thumbTintColor

Declared In

RBSwitchField.h

  onImage

The image to display when the switch is on.

@property (nonatomic, nullable) UIImage *onImage

Declared In

RBSwitchField.h

  offImage

The image to display when the switch is off.

@property (nonatomic, nullable) UIImage *offImage

Declared In

RBSwitchField.h

  labelText

The label text to display next to the switch.

@property (nonatomic, nullable) NSString *labelText

Declared In

RBSwitchField.h

  labelAlignment

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

@property (nonatomic) RBHorizontalAlignment labelAlignment

Declared In

RBSwitchField.h

  on

Gets or sets whether the switch is on.

@property (nonatomic, getter=isOn) BOOL 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.

Declared In

RBSwitchField.h