RBToggleButtonDelegate Protocol Reference

Conforms to NSObject
Declared in RBToggleButton.h

Overview

A delegate that receives mode change events from an RBToggleButton.

– toggleButtonWasTapped:

Called when a toggle button was tapped by the user.

- (void)toggleButtonWasTapped:(nonnull RBToggleButton *)toggleButton

Parameters

toggleButton

The RBToggleButton object.

Declared In

RBToggleButton.h

– toggleButton:shouldSelectMode:fromMode:byUser:

Whether or not the toggle button should change modes.

- (BOOL)toggleButton:(nonnull RBToggleButton *)toggleButton shouldSelectMode:(NSUInteger)mode fromMode:(NSUInteger)fromMode byUser:(BOOL)byUser

Parameters

toggleButton

The RBToggleButton object.

mode

The index of the mode that will be switched to if accepted.

fromMode

The index of the mode that will be switched from if accepted.

byUser

Whether or not the mode change is caused by a user interaction.

Return Value

Whether or not to allow the mode change.

Declared In

RBToggleButton.h

– toggleButton:willSelectMode:fromMode:byUser:

Called when a toggle button will change modes.

- (void)toggleButton:(nonnull RBToggleButton *)toggleButton willSelectMode:(NSUInteger)mode fromMode:(NSUInteger)fromMode byUser:(BOOL)byUser

Parameters

toggleButton

The RBToggleButton object.

mode

The index of the mode that will be switched to.

fromMode

The index of the mode that will be switched from.

byUser

Whether or not the mode change is caused by a user interaction.

Declared In

RBToggleButton.h

– toggleButton:didSelectMode:fromMode:byUser:

Called when a toggle button has changed modes.

- (void)toggleButton:(nonnull RBToggleButton *)toggleButton didSelectMode:(NSUInteger)mode fromMode:(NSUInteger)fromMode byUser:(BOOL)byUser

Parameters

toggleButton

The RBToggleButton object.

mode

The index of the mode that was switched to.

fromMode

The index of the mode that was switched from.

byUser

Whether or not the mode change is caused by a user interaction.

Declared In

RBToggleButton.h