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
Discussion
The RBMenuView
that this segment belongs to.
Declared In
RBMenuSegmentView.h
identifier
The unique identifier of the segment.
@property (nonatomic, readonly, nonnull) NSString *identifier
Discussion
The unique identifier of the segment.
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
Discussion
Theme values to apply after any other prior theming has been applied.
Declared In
RBMenuSegmentView.h
items
An array of RBMenuSegmentButton schemas. The following types are supported:
RBMenuSegmentButtonSchema
, RBMenuSegmentToggleButtonSchema
, RBMenuSegmentCustomItemSchema
.
@property (nonatomic, nullable) NSArray *items
Discussion
An array of RBMenuSegmentButton schemas. The following types are supported:
RBMenuSegmentButtonSchema
, RBMenuSegmentToggleButtonSchema
, RBMenuSegmentCustomItemSchema
.
Declared In
RBMenuSegmentView.h
buttonHeights
The height to use for buttons (including toggle buttons). Default = 50.
@property (nonatomic) CGFloat buttonHeights
Discussion
The height to use for buttons (including toggle buttons). Default = 50.
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 = RBLayoutGridPositionerSizingToExpand
.
@property (nonatomic, nonnull, readonly) RBLayoutGridPositioner *positioner
Discussion
The overall layout positioner used. You may theme this positioner. Default values =
spacing = 5,
dimensions = 1,
margin = [0, 0, 0, 0],
orientation = RBOrientationVertical
,
sizing = RBLayoutGridPositionerSizingToExpand
.
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 = RBLayoutGridPositionerSizingToExpand
.
@property (nonatomic, nonnull, readonly) RBLayoutGridPositioner *itemPositioner
Discussion
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 = RBLayoutGridPositionerSizingToExpand
.
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 |
themeOverrides |
Theme values to apply after any other prior theming has been applied. |
Return Value
The initialized RBMenuSegmentView
.
Discussion
Initializes a new RBMenuSegmentView
.
Declared In
RBMenuSegmentView.h
– toggleButtonSelectedAtIndex:
Toggles the selection state of the toggle button at the given index.
- (BOOL)toggleButtonSelectedAtIndex:(NSUInteger)index
Parameters
index |
The index of the button to toggle. |
---|
Return Value
The new selected state of the toggled button.
Discussion
Toggles the selection state of the toggle button at the given index.
Declared In
RBMenuSegmentView.h
– setToggleButtonSelected:atIndex:
Sets the selected state of the toggle button at the given index.
- (void)setToggleButtonSelected:(BOOL)selected atIndex:(NSUInteger)index
Parameters
selected |
Whether or not the toggle button should be selected. |
---|---|
index |
The index of the button. |
Discussion
Sets the selected state of the toggle button at the given index.
Declared In
RBMenuSegmentView.h