RBBaseCellView Class Reference
Inherits from | UIView |
---|---|
Conforms to | RBEventListener UIGestureRecognizerDelegate |
Declared in | RBBaseCellView.h |
Overview
The base class for a table cell, providing button functionality and events. Note: If you use this class for your cell, buttons will not respond to taps inside of bodyView. Instead you must use the built in leftButtons and rightButton properties to add buttons.
Other Methods
bodyView
The body view of the cell.
@property (nonatomic, readonly, nonnull) UIView *bodyView
Discussion
The body view of the cell.
Declared In
RBBaseCellView.h
delegate
The delegate for the cell, to be notified of cell events such as taps and button events.
@property (nonatomic, weak, nullable) id<RBCellDelegate> delegate
Discussion
The delegate for the cell, to be notified of cell events such as taps and button events.
Declared In
RBBaseCellView.h
highlighted
Whether or not the cell is currently highlighted.
@property (atomic, readonly) BOOL highlighted
Discussion
Whether or not the cell is currently highlighted.
Declared In
RBBaseCellView.h
buttonAreaIsMoving
Whether or not the user is currently sliding the body view revealing the button area.
@property (readonly) BOOL buttonAreaIsMoving
Discussion
Whether or not the user is currently sliding the body view revealing the button area.
Declared In
RBBaseCellView.h
leftButtonAreaIsOpen
Whether or not the left button area is currently open.
@property (readonly) BOOL leftButtonAreaIsOpen
Discussion
Whether or not the left button area is currently open.
Declared In
RBBaseCellView.h
rightButtonAreaIsOpen
Whether or not the right button area is currently open.
@property (readonly) BOOL rightButtonAreaIsOpen
Discussion
Whether or not the right button area is currently open.
Declared In
RBBaseCellView.h
leftButtons
An array of RBCellViewButtonSchema
objects describing the buttons on the left side of the cell.
@property (nonatomic, nullable) NSArray<RBCellViewButtonSchema*> *leftButtons
Discussion
An array of RBCellViewButtonSchema
objects describing the buttons on the left side of the cell.
Declared In
RBBaseCellView.h
rightButtons
An array of RBCellViewButtonSchema
objects describing the buttons on the right side of the cell.
@property (nonatomic, nullable) NSArray<RBCellViewButtonSchema*> *rightButtons
Discussion
An array of RBCellViewButtonSchema
objects describing the buttons on the right side of the cell.
Declared In
RBBaseCellView.h
enabled
Whether or not the cell is currently enabled and will accept user interaction. Default = YES
.
@property (nonatomic) BOOL enabled
Discussion
Whether or not the cell is currently enabled and will accept user interaction. Default = YES
.
Declared In
RBBaseCellView.h
allowsSelection
Whether or not the cell allows selection. Default = YES
.
@property (nonatomic) BOOL allowsSelection
Discussion
Whether or not the cell allows selection. Default = YES
.
Declared In
RBBaseCellView.h
– setEnabled:animated:
Sets whether or not the cell is currently enabled with a value indicating whether the transition should be animated.
- (void)setEnabled:(BOOL)enabled animated:(BOOL)animated
Parameters
enabled |
Whether or not the cell should be enabled. |
---|---|
animated |
Whether or not to animated the transition. |
Discussion
Sets whether or not the cell is currently enabled with a value indicating whether the transition should be animated.
Declared In
RBBaseCellView.h
highlightEnabled
Whether or not the cell can be highlighted by user touches. Default = YES
.
@property (atomic) BOOL highlightEnabled
Discussion
Whether or not the cell can be highlighted by user touches. Default = YES
.
Declared In
RBBaseCellView.h
selected
Whether or not the cell is currently selected. Default = false
.
@property (nonatomic) BOOL selected
Discussion
Whether or not the cell is currently selected. Default = false
.
Declared In
RBBaseCellView.h
alternate
Whether or not this is the ‘alternate’ cell. Default = false
.
@property (nonatomic) BOOL alternate
Discussion
Whether or not this is the ‘alternate’ cell. Default = false
.
Declared In
RBBaseCellView.h
– setSelected:animated:
Sets whether or not the cell is currently selected with a value indicating whether the transition should be animated.
- (void)setSelected:(BOOL)selected animated:(BOOL)animated
Parameters
selected |
Whether or not the cell should be selected. |
---|---|
animated |
Whether or not to animated the transition. |
Discussion
Sets whether or not the cell is currently selected with a value indicating whether the transition should be animated.
Declared In
RBBaseCellView.h
minimumSize
The minimum size that the cell will return when asked using sizeThatFits:
. Default = CGSizeZero
.
@property (nonatomic) CGSize minimumSize
Discussion
The minimum size that the cell will return when asked using sizeThatFits:
. Default = CGSizeZero
.
Declared In
RBBaseCellView.h
maximumSize
The maximum size that the cell will return when asked using sizeThatFits:
. Default = CGSizeZero
.
@property (nonatomic) CGSize maximumSize
Discussion
The maximum size that the cell will return when asked using sizeThatFits:
. Default = CGSizeZero
.
Declared In
RBBaseCellView.h
slideAnimator
The animator that is used when sliding the body view to reveal the button area.
@property (nonatomic, readonly, nonnull) RBAnimator *slideAnimator
Discussion
The animator that is used when sliding the body view to reveal the button area.
Declared In
RBBaseCellView.h
highlightAnimator
The animator that is used when transitioning in and out of the highlighted
state.
@property (nonatomic, readonly, nonnull) RBAnimator *highlightAnimator
Discussion
The animator that is used when transitioning in and out of the highlighted
state.
Declared In
RBBaseCellView.h
– openLeftButtonAreaWithAnimation:completion:
Slide the body view to reveal the left button area to the user.
- (void)openLeftButtonAreaWithAnimation:(BOOL)animated completion:(nullable dispatch_block_t)completion
Parameters
animated |
Whether or not the transition should be animated. |
---|---|
completion |
The completion block to be called after the transition is complete (optional). |
Discussion
Slide the body view to reveal the left button area to the user.
Declared In
RBBaseCellView.h
– openRightButtonAreaWithAnimation:completion:
Slide the body view to reveal the right button area to the user.
- (void)openRightButtonAreaWithAnimation:(BOOL)animated completion:(nullable dispatch_block_t)completion
Parameters
animated |
Whether or not the transition should be animated. |
---|---|
completion |
The completion block to be called after the transition is complete (optional). |
Discussion
Slide the body view to reveal the right button area to the user.
Declared In
RBBaseCellView.h
– closeButtonAreaWithAnimation:completion:
Slide the body view to hide the button area from the user.
- (void)closeButtonAreaWithAnimation:(BOOL)animated completion:(nullable dispatch_block_t)completion
Parameters
animated |
Whether or not the transition should be animated. |
---|---|
completion |
The completion block to be called after the transition is complete (optional). |
Discussion
Slide the body view to hide the button area from the user.
Declared In
RBBaseCellView.h
Subclassing Hooks
shouldResetCellsOnBodyTap
Whether or not a reset event should be sent to all cells to close their
button areas when the body of this cell is tapped. Default = YES
.
@property (nonatomic, readonly) BOOL shouldResetCellsOnBodyTap
Discussion
Whether or not a reset event should be sent to all cells to close their
button areas when the body of this cell is tapped. Default = YES
.
Declared In
RBBaseCellView.h
– populateBodyView:
Called when initializing the cell. Use this method to instantiate and add
the subviews to the bodyView
object.
- (void)populateBodyView:(nonnull __kindof UIView *)bodyView
Parameters
bodyView |
The body view of the cell. |
---|
Discussion
Called when initializing the cell. Use this method to instantiate and add
the subviews to the bodyView
object.
Declared In
RBBaseCellView.h
– layoutBodyView:
Called when laying out the subviews of the cell. Use this method to set the
frames of the subviews in the bodyView
.
- (void)layoutBodyView:(nonnull __kindof UIView *)bodyView
Parameters
bodyView |
The body view of the cell. |
---|
Discussion
Called when laying out the subviews of the cell. Use this method to set the
frames of the subviews in the bodyView
.
Declared In
RBBaseCellView.h
– applyTheme:toBodyView:
Called when applying a theme to the cell. Use this method to apply the theme
to the subviews of the bodyView
.
- (void)applyTheme:(nonnull NSDictionary<NSString*,id> *)theme toBodyView:(nonnull __kindof UIView *)bodyView
Parameters
theme |
The body theme dictionary. |
---|---|
bodyView |
The body view of the cell. |
Discussion
Called when applying a theme to the cell. Use this method to apply the theme
to the subviews of the bodyView
.
Declared In
RBBaseCellView.h
– bodyViewSizeThatFitsSize:
Called to determine the desired size of the body view.
- (CGSize)bodyViewSizeThatFitsSize:(CGSize)size
Parameters
size |
The available size in the container for the cell body. |
---|
Return Value
The desired cell body size.
Discussion
Called to determine the desired size of the body view.
Declared In
RBBaseCellView.h
– willReceiveResetEventAtIndex:
Called when the reset signal has been received and is about to be processed.
- (void)willReceiveResetEventAtIndex:(NSUInteger)index
Parameters
index |
The index of the cell. |
---|
Discussion
Called when the reset signal has been received and is about to be processed.
Declared In
RBBaseCellView.h
– shouldIgnoreResetEventAtIndex:
Determines whether or not a received reset event should be ignored.
- (BOOL)shouldIgnoreResetEventAtIndex:(NSUInteger)index
Parameters
index |
The index of the cell. |
---|
Return Value
Whether or not to ignore the reset event.
Discussion
Determines whether or not a received reset event should be ignored.
Declared In
RBBaseCellView.h
– didReceiveResetEventAtIndex:
Called when the reset event was received and processed.
- (void)didReceiveResetEventAtIndex:(NSUInteger)index
Parameters
index |
The index of the cell. |
---|
Discussion
Called when the reset event was received and processed.
Declared In
RBBaseCellView.h
– cellWillSelect:atIndex:
Called when a cell will be selected.
- (void)cellWillSelect:(nonnull nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when a cell will be selected.
Declared In
RBBaseCellView.h
– cellDidSelect:atIndex:
Called when the cell was selected.
- (void)cellDidSelect:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell was selected.
Declared In
RBBaseCellView.h
– cellWillUnselect:atIndex:
Called when the cell will be unselected.
- (void)cellWillUnselect:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell will be unselected.
Declared In
RBBaseCellView.h
– cellDidUnselect:atIndex:
Called when the cell was unselected.
- (void)cellDidUnselect:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell was unselected.
Declared In
RBBaseCellView.h
– cellWillEnable:atIndex:
Called when the cell will be enabled.
- (void)cellWillEnable:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell will be enabled.
Declared In
RBBaseCellView.h
– cellDidEnable:atIndex:
Called when the cell was enabled.
- (void)cellDidEnable:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell was enabled.
Declared In
RBBaseCellView.h
– cellWillDisable:atIndex:
Called when the cell will be disabled.
- (void)cellWillDisable:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell will be disabled.
Declared In
RBBaseCellView.h
– cellDidDisable:atIndex:
Called when the cell was disabled.
- (void)cellDidDisable:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell was disabled.
Declared In
RBBaseCellView.h
– cellWillHighlight:atIndex:
Called when the cell will be highlighted.
- (void)cellWillHighlight:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell will be highlighted.
Declared In
RBBaseCellView.h
– cellDidHighlight:atIndex:
Called when the cell was highlighted.
- (void)cellDidHighlight:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell was highlighted.
Declared In
RBBaseCellView.h
– cellWillRemoveHighlight:atIndex:
Called when the cell will be unhighlighted.
- (void)cellWillRemoveHighlight:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell will be unhighlighted.
Declared In
RBBaseCellView.h
– cellDidRemoveHighlight:atIndex:
Called when the cell was unhighlighted.
- (void)cellDidRemoveHighlight:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell was unhighlighted.
Declared In
RBBaseCellView.h
– cellWasSelectedWithCancelNotifyDelegate:atIndex:
Called when the cell was selected.
- (void)cellWasSelectedWithCancelNotifyDelegate:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell was selected.
Declared In
RBBaseCellView.h
– buttonAreaWillStartMoving:atIndex:
Called when the cell’s button area will start panning due to user interaction.
- (void)buttonAreaWillStartMoving:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell’s button area will start panning due to user interaction.
Declared In
RBBaseCellView.h
– buttonAreaDidStartMoving:atIndex:
Called when the cell’s button area did start panning due to user interaction.
- (void)buttonAreaDidStartMoving:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell’s button area did start panning due to user interaction.
Declared In
RBBaseCellView.h
– buttonAreaWillStopMoving:atIndex:
Called when the cell’s button area will stop panning due to user interaction.
- (void)buttonAreaWillStopMoving:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell’s button area will stop panning due to user interaction.
Declared In
RBBaseCellView.h
– buttonAreaDidStopMoving:atIndex:
Called when the cell’s button area did stop panning due to user interaction.
- (void)buttonAreaDidStopMoving:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the cell’s button area did stop panning due to user interaction.
Declared In
RBBaseCellView.h
– buttonAreaShouldOpenAtIndex:
Called to determine whether the button area should open.
- (BOOL)buttonAreaShouldOpenAtIndex:(NSUInteger)index
Parameters
index |
The index of the cell. |
---|
Return Value
Whether or not the button area should open.
Discussion
Called to determine whether the button area should open.
Declared In
RBBaseCellView.h
– buttonAreaWillOpen:atIndex:
Called when the button area will open.
- (void)buttonAreaWillOpen:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the button area will open.
Declared In
RBBaseCellView.h
– buttonAreaDidOpen:atIndex:
Called when the button area did open.
- (void)buttonAreaDidOpen:(nonnull nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the button area did open.
Declared In
RBBaseCellView.h
– buttonAreaShouldCloseAtIndex:
Called to determine whether the button area should close.
- (BOOL)buttonAreaShouldCloseAtIndex:(NSUInteger)index
Parameters
index |
The index of the cell. |
---|
Return Value
Whether or not the button area should close.
Discussion
Called to determine whether the button area should close.
Declared In
RBBaseCellView.h
– buttonAreaWillClose:atIndex:
Called when the button area will close.
- (void)buttonAreaWillClose:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the button area will close.
Declared In
RBBaseCellView.h
– buttonAreaDidClose:atIndex:
Called when the button area did close.
- (void)buttonAreaDidClose:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
---|---|
index |
The index of the cell. |
Discussion
Called when the button area did close.
Declared In
RBBaseCellView.h
– buttonWasSelectedWithIdentifier:cancelNotifyDelegate:atIndex:
Called when a button was selected.
- (void)buttonWasSelectedWithIdentifier:(nonnull NSString *)identifier cancelNotifyDelegate:(nonnull BOOL *)cancelNotifyDelegate atIndex:(NSUInteger)index
Parameters
identifier |
The identifier of the button that was selected. |
---|---|
cancelNotifyDelegate |
A pointer to a boolean to be set to cancel the delegate being informed of this event. |
index |
The index of the cell. |
Discussion
Called when a button was selected.
Declared In
RBBaseCellView.h