SCSActionManagerDelegate Protocol Reference

Conforms to NSObject
Declared in SCSActionManagerDelegate.h

Overview

Delegate protocol used by the SCSActionManager to customize the appearance and functionality of the action manager.

– actionManagerContainerViewController:

Asks the delegate for a view controller to present action buttons to the user when it is about to be presented.

- (nullable __kindof UIViewController<SCSActionItemContainer> *)actionManagerContainerViewController:(SCSActionManager *)actionManager

Parameters

actionManager

SCSActionManager instance.

Return Value

Constructed UIViewController instance, conforming to the SCSActionItemContainer protocol, or nil if no action button controller should be shown.

Discussion

This method should only be used when a developer wishes to customize the appearance of the action buttons, or when the action display controller should be disallowed.

If no action buttons should be displayed to the user, this method can return nil.

If this is a view controller, it will be presented in the UI for you. Otherwise, your application is responsible for managing the display of these items yourself.

Declared In

SCSActionManagerDelegate.h

– actionManager:viewForActionItemWithName:

Asks the delegate to supply a custom view for the action of the given name. If the return value is nil, the default system-provided view will be used, if any.

- (nullable __kindof UIView<SCSActionItem> *)actionManager:(SCSActionManager *)actionManager viewForActionItemWithName:(SCSAction)name

Parameters

actionManager

SCSActionManager instance.

name

Action name.

Return Value

UIView conforming to SCSActionItem to represent the given action, or nil to accept the system default.

Discussion

The view is expected to trigger the action as needed using the [SCSActionManager performActionWithName:actionItem:].

Declared In

SCSActionManagerDelegate.h

– actionManager:sortIndexForActionItemWithName:

Asks the delegate to indicate the relative sort positioning of the given action item.

- (NSInteger)actionManager:(SCSActionManager *)actionManager sortIndexForActionItemWithName:(SCSAction)name

Parameters

actionManager

SCSActionManager instance.

name

Action name.

Return Value

Integer value indicating the sort position of the given action.

Declared In

SCSActionManagerDelegate.h

– actionManager:actionsToShowForViewController:withDefaultActions:

Asks the delegate for the set of named actions that should be shown when the given controller is presented. If this method is not implemented a set of defaults is automatically determined. This default set of actions is supplied to this method to allow the default behavior to be maintained when needed, or to extend or subtract from the default set.

- (nullable NSSet<SCSAction> *)actionManager:(SCSActionManager *)actionManager actionsToShowForViewController:(nullable UIViewController *)controller withDefaultActions:(NSSet<SCSAction> *)defaultActions

Parameters

actionManager

SCSActionManager instance.

controller

The controller that is being presented, or nil if the last controller has been dismised.

defaultActions

The default actions that would be displayed for this given controller.

Return Value

Set of string action item names to display.

Discussion

When no controllers are visible, the controller property may be nil.

Declared In

SCSActionManagerDelegate.h

– actionManager:shouldShowContainerForViewController:

Asks the delegate whether or not the action container should be shown when the given controller becomes visible. This provides the delegate with the opportunity to conditionally show or hide the action items when the visible state of the Service SDK changes.

- (BOOL)actionManager:(SCSActionManager *)actionManager shouldShowContainerForViewController:(nullable UIViewController *)controller

Parameters

actionManager

The action manager instance.

controller

The controller about to be presented, or nil if the last controller is being dismissed.

Return Value

YES if the container should be visible, otherwise NO if the action container should be hidden.

Discussion

If the resulting container visibility is different from the current state, the appropriate change will be made, and the accompanying [SCSActionManagerDelegate actionManager:containerWillChangeVisibility:animated:] and [SCSActionManagerDelegate actionManager:containerDidChangeVisibility:animated:] methods will be invoked as needed.

If the supplied controller’s presentation, or dismissal, is animated, this will result in the action container’s visibility change being animated as well.

Declared In

SCSActionManagerDelegate.h

– actionManager:containerWillChangeVisibility:animated:

Message sent to the delegate when the action container will change its visibility, either to be shown or hidden.

- (void)actionManager:(SCSActionManager *)actionManager containerWillChangeVisibility:(BOOL)visible animated:(BOOL)animated

Parameters

actionManager

The action manager instance.

visible

YES if the action container will become visible, otherwise NO if the action bar will become hidden.

animated

YES if the visibility change will be animated.

Declared In

SCSActionManagerDelegate.h

– actionManager:containerDidChangeVisibility:animated:

Message sent to the delegate after the action container has changed its visibility, either to be shown or hidden.

- (void)actionManager:(SCSActionManager *)actionManager containerDidChangeVisibility:(BOOL)visible animated:(BOOL)animated

Parameters

actionManager

The action manager instance.

visible

YES if the action container became visible, otherwise NO if the action bar is hidden.

animated

YES if the visibility change was animated.

Declared In

SCSActionManagerDelegate.h

– actionManager:performActionWithName:actionItem:

YES if the action was handled, or NO if the default behavior should be performed for this action.

- (BOOL)actionManager:(SCSActionManager *)actionManager performActionWithName:(SCSAction)actionName actionItem:(nullable UIView<SCSActionItem> *)actionItem

Return Value

YES if the action was handled, or NO if the default behavior should be performed for this action.

Declared In

SCSActionManagerDelegate.h

– actionManager:shouldShowActionWithName:

Asks the delegate whether the specified action button should be present.

- (BOOL)actionManager:(SCSActionManager *)actionManager shouldShowActionWithName:(SCSAction)name

Parameters

actionManager

SCSActionManager instance.

name

Name representing the action in question.

Return Value

YES if the action button should be visible; NO if the action button should be omitted.

Declared In

SCSActionManagerDelegate.h