RBMenuSegmentView Class Reference

Inherits from UIView
Declared in RBMenuSegmentView.h

Overview

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.

  menuView

The RBMenuView that this segment belongs to.

@property (nonatomic, weak, nullable) RBMenuView *menuView

Declared In

RBMenuSegmentView.h

  identifier

The unique identifier of the segment.

@property (nonatomic, readonly, nonnull) NSString *identifier

Declared In

RBMenuSegmentView.h

  themeOverrides

Theme values to apply after any other prior theming has been applied.

@property (nonatomic, readonly, nullable) NSDictionary<NSString*id> *themeOverrides

Declared In

RBMenuSegmentView.h

  headerView

The header view to display above the button items.

@property (nonatomic, nullable) UIView *headerView

Declared In

RBMenuSegmentView.h

  buttons

An array of RBMenuSegmentButton schemas.

@property (nonatomic, nullable) NSArray<RBMenuSegmentButtonSchema*> *buttons

Declared In

RBMenuSegmentView.h

  toggledButtonIdentifiers

The identfiers of the buttons that are toggled on.

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

Declared In

RBMenuSegmentView.h

  buttonHeights

The height to use for buttons (including toggle buttons). Default = 50.

@property (nonatomic) CGFloat buttonHeights

Declared In

RBMenuSegmentView.h

  customButtonHeights

The height to use custom buttons. Default = 50.

@property (nonatomic) CGFloat customButtonHeights

Declared In

RBMenuSegmentView.h

  positioner

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

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

Declared In

RBMenuSegmentView.h

  itemPositioner

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 = RBLayoutGridPositionerSizeEvenly.

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

Declared In

RBMenuSegmentView.h

– initWithIdentifier:menuView:themeOverrides:

Initializes a new RBMenuSegmentView.

- (nonnull instancetype)initWithIdentifier:(nonnull NSString *)identifier menuView:(nonnull RBMenuView *)menuView themeOverrides:(nullable NSDictionary<NSString*,id> *)themeOverrides

Parameters

identifier

The unique identifier of the segment.

menuView

The associated RBMenuView this segment belongs to.

themeOverrides

Theme values to apply after any other prior theming has been applied.

Return Value

The initialized RBMenuSegmentView.

Declared In

RBMenuSegmentView.h

– setToggleButtonSelected:forIdentifier:

Sets the selected state of the toggle button at the given index.

- (void)setToggleButtonSelected:(BOOL)selected forIdentifier:(nonnull NSString *)identifier

Parameters

selected

Whether or not the toggle button should be selected.

identifier

The indentifier of the toggled button.

Declared In

RBMenuSegmentView.h