SCSActionItemContainer Protocol Reference
Conforms to | NSObject |
---|---|
Declared in | SCSActionItemContainer.h |
Overview
Protocol defining a type of UIViewController
that can be used to display SCSActionItem
objects.
– addActionView:forName:atSortIndex:animated:
required method
Adds an action view for the given name.
- (void)addActionView:(UIView<SCSActionItem> *)view forName:(SCSAction)name atSortIndex:(NSInteger)sortIndex animated:(BOOL)animated
Parameters
view |
The action view to add. |
---|---|
name |
The name of the action. |
sortIndex |
Preferred sort position relative to other views, or |
animated |
Indicates if the addition should be animated. |
Discussion
This will insert the view into the view hierarchy, and will include it sorted with the set of views if applicable. A built-in animation is provided if the animated property is YES
.
Declared In
SCSActionItemContainer.h
– removeActionViewForName:animated:
required method
Removes the action view with the given name.
- (void)removeActionViewForName:(SCSAction)name animated:(BOOL)animated
Parameters
name |
Name of the action to remove. |
---|---|
animated |
Indicates if the removal should be animated. |
Declared In
SCSActionItemContainer.h
– actionViewForName:
required method
Returns the action view with the given name.
- (nullable UIView<SCSActionItem> *)actionViewForName:(SCSAction)name
Parameters
name |
Name of the action. |
---|
Return Value
Action view with that name, or nil
if no view matches that name.
Discussion
If no action view is visible with that name, this method can return nil
.
Declared In
SCSActionItemContainer.h
– visibleActionNames
required method
Returns the names for the currently-visible action views.
- (NSArray<SCSAction> *)visibleActionNames
Return Value
Ordered list of visible action names.
Declared In
SCSActionItemContainer.h
– shouldAdjustVisibilityWhenContentScrolls
Indicates whether or not the item container should automatically adjust its visibility when the content on the screen scrolls.
- (BOOL)shouldAdjustVisibilityWhenContentScrolls
Return Value
YES
if scrollable content should cause the action container to show or hide, otherwise NO
.
Discussion
If not implemented, the default is assumed to be NO
.
Declared In
SCSActionItemContainer.h