Index

RBMenuSegmentView.h

Classes


RBMenuSegmentView

A menu segment view. Note theming is applied for items in the following order, theme from json, (if item is top or bottom) apply top/bottom theme > apply theme from button schema theme identifier > apply theme from button schema override.

Properties

The RBMenuView that this segment belongs to.
public weak menuView RBMenuView? { get set }

The unique identifier of the segment.
public identifier NSString { get }

Theme values to apply after any other prior theming has been applied.
public themeOverrides [String : Any]? { get }

The header view to display above the button items.
public headerView UIView? { get set }

An array of RBMenuSegmentButton schemas.
public buttons [RBMenuSegmentButtonSchema]? { get set }

The identfiers of the buttons that are toggled on.
public toggledButtonIdentifiers [String] { get }

The height to use for buttons (including toggle buttons). Default = 50.
public buttonHeights CGFloat { get set }

The height to use custom buttons. Default = 50.
public customButtonHeights CGFloat { get set }

The overall layout positioner used. You may theme this positioner. Default values = spacing = 5, dimensions = 1, margin = [0, 0, 0, 0], orientation = RBOrientationVertical, sizing = RBGridPositionerSizeEvenly.
public positioner RBGridPositioner { get }

The layout positioner used for the buttons and items. You may theme this positioner. Default values = spacing = 5, dimensions = 1, margin = [0, 0, 0, 0], orientation = RBOrientationVertical, sizing = RBGridPositionerSizeEvenly.
public itemPositioner RBGridPositioner { get }

Functions

Initializes a new RBMenuSegmentView.
@param identifier : The unique identifier of the segment.
@param menuView : The associated RBMenuView this segment belongs to.
@param themeOverrides : Theme values to apply after any other prior theming has been applied.
@returns The initialized RBMenuSegmentView.
- (nonnull instancetype)initWithIdentifier:(nonnull NSString *)identifier

Sets the selected state of the toggle button at the given index.
@param selected : Whether or not the toggle button should be selected.
@param identifier : The indentifier of the toggled button.
- (void)setToggleButtonSelected:(BOOL)selected forIdentifier:(nonnull NSString*)identifier;