RBMultipleChoiceField Class Reference

Inherits from UIControl
Declared in RBMultipleChoiceField.h

Overview

A multiple choice field.

  delegate

A delegate to receive item selection events.

@property (nonatomic, weak, nullable) id<RBMultipleChoiceFieldDelegate> delegate

Discussion

A delegate to receive item selection events.

Declared In

RBMultipleChoiceField.h

  singleSelectionOnly

Whether or not multiple selection is disabled. Default = NO.

@property (nonatomic) BOOL singleSelectionOnly

Discussion

Whether or not multiple selection is disabled. Default = NO.

Declared In

RBMultipleChoiceField.h

  zeroSelectionAllowed

Whether or not the last selected item can be unselected. Default = NO.

@property (nonatomic) BOOL zeroSelectionAllowed

Discussion

Whether or not the last selected item can be unselected. Default = NO.

Declared In

RBMultipleChoiceField.h

  options

An array of RBMultipleChoiceFieldOption objects.

@property (nonatomic, nullable) NSArray<RBMultipleChoiceFieldOption*> *options

Discussion

An array of RBMultipleChoiceFieldOption objects.

Declared In

RBMultipleChoiceField.h

  selectedOptions

An array of selected RBMultipleChoiceFieldOption objects.

@property (nonatomic, nullable) NSSet<RBMultipleChoiceFieldOption*> *selectedOptions

Discussion

An array of selected RBMultipleChoiceFieldOption objects.

Declared In

RBMultipleChoiceField.h

  buttonSize

The size of the selection buttons. Default = 50, 50.

@property (nonatomic) CGSize buttonSize

Discussion

The size of the selection buttons. Default = 50, 50.

Declared In

RBMultipleChoiceField.h

  positioner

The overall positioner used. You may theme this positioner. Default values = spacing = 0, dimensions = 1, margin = [0, 0, 0, 0], orientation = RBOrientationVertical, sizing = RBLayoutGridPositionerSizingToExpand.

@property (nonatomic, nonnull, readonly) RBLayoutGridPositioner *positioner

Discussion

The overall positioner used. You may theme this positioner. Default values = spacing = 0, dimensions = 1, margin = [0, 0, 0, 0], orientation = RBOrientationVertical, sizing = RBLayoutGridPositionerSizingToExpand.

Declared In

RBMultipleChoiceField.h

– optionIsSelected:

Determines whether a given option is selected.

- (BOOL)optionIsSelected:(nonnull RBMultipleChoiceFieldOption *)option

Parameters

option

The option to check.

Return Value

Whether or not the option is selected.

Discussion

Determines whether a given option is selected.

Declared In

RBMultipleChoiceField.h

– setSelected:withOption:

Updates the selection state of an option.

- (void)setSelected:(BOOL)selected withOption:(nonnull RBMultipleChoiceFieldOption *)option

Parameters

selected

Whether or not the option should be updated to selected (true) or unselected (false).

option

The option to update the selection state of.

Discussion

Updates the selection state of an option.

Declared In

RBMultipleChoiceField.h

– hasOptionWithValue:

Determines whether the field has an option with the given value.

- (BOOL)hasOptionWithValue:(nonnull NSString *)value

Parameters

value

The value to search for.

Return Value

Whether or not the value was found.

Discussion

Determines whether the field has an option with the given value.

Declared In

RBMultipleChoiceField.h

– optionValueIsSelected:

Whether or not the option with the given value is selected.

- (BOOL)optionValueIsSelected:(nonnull NSString *)value

Parameters

value

The value to search for.

Return Value

Whether or not the value is selected.

Discussion

Whether or not the option with the given value is selected.

Declared In

RBMultipleChoiceField.h

– setSelected:withOptionValue:

Updates the selection state of the option with the given value.

- (void)setSelected:(BOOL)selected withOptionValue:(nonnull NSString *)value

Parameters

selected

Whether or not to update the option to selected (true) or unselected (false).

value

The value of the option to update.

Discussion

Updates the selection state of the option with the given value.

Declared In

RBMultipleChoiceField.h

  selectedOptionValues

The values of the options that are selected.

@property (nonatomic, readonly, nonnull) NSArray<NSString*> *selectedOptionValues

Discussion

The values of the options that are selected.

Declared In

RBMultipleChoiceField.h

– unselectAllOptionValues

Unselect all options.

- (void)unselectAllOptionValues

Discussion

Unselect all options.

Declared In

RBMultipleChoiceField.h

– optionsDidChange

Called when the set of options was changed.

- (void)optionsDidChange

Discussion

Called when the set of options was changed.

Declared In

RBMultipleChoiceField.h

– optionWillSelect:

Called when an option will select.

- (void)optionWillSelect:(nonnull RBMultipleChoiceFieldOption *)option

Parameters

option

The option that is being selected.

Discussion

Called when an option will select.

Declared In

RBMultipleChoiceField.h

– optionDidSelect:

Called when an option was selected.

- (void)optionDidSelect:(nonnull RBMultipleChoiceFieldOption *)option

Parameters

option

The option that is being selected.

Discussion

Called when an option was selected.

Declared In

RBMultipleChoiceField.h

– optionWillDeselect:

Called when an option will be unselected.

- (void)optionWillDeselect:(nonnull RBMultipleChoiceFieldOption *)option

Parameters

option

The option that is being unselected.

Discussion

Called when an option will be unselected.

Declared In

RBMultipleChoiceField.h

– optionDidDeselect:

Called when an option was unselected.

- (void)optionDidDeselect:(nonnull RBMultipleChoiceFieldOption *)option

Parameters

option

The option that is being unselected.

Discussion

Called when an option was unselected.

Declared In

RBMultipleChoiceField.h