SCViewControllerActions Class Reference
Inherits from | NSObject |
Declared in | SCViewControllerActions.h |
Overview
This class hosts a set of view controller action blocks. Once an action is set to a desired code block, it will execute the block as soon as the action occurs.
SCViewControllerAction_Block syntax:
action = ^(SCViewController *viewController)
{
// Your code here
};
Tasks
-
willAppear
Action gets called when the view controller is about to appear.
property -
didAppear
Action gets called when the view controller has appeared.
property -
willDisappear
Action gets called when the view controller is about to disappear.
property -
didDisappear
Action gets called when the view controller has disappeared.
property -
willPresent
Action gets called when the view controller is about to appear for the first time.
property -
didPresent
Action gets called when the view controller has appeared for the first time.
property -
willDismiss
Action gets called when the view controller is about to be dismissed.
property -
didDismiss
Action gets called when the view controller has been dismissed.
property -
cancelButtonTapped
Action gets called when the view controller’s Cancel button has been tapped. Return FALSE to ignore the tap, otherwise return TRUE.
property -
doneButtonTapped
Action gets called when the view controller’s Done button has been tapped. Return FALSE to ignore the tap, otherwise return TRUE.
property -
editButtonTapped
Action gets called when the view controller’s Edit button has been tapped. Return FALSE to ignore the tap, otherwise return TRUE.
property
Properties
cancelButtonTapped
Action gets called when the view controller’s Cancel button has been tapped. Return FALSE to ignore the tap, otherwise return TRUE.
@property (nonatomic, copy) SCViewControllerButtonTappedAction_Block cancelButtonTapped
Discussion
Example:
action = ^BOOL(SCViewController *)viewController
{
// your code here
return TRUE; // accept the tap
}
Declared In
SCViewControllerActions.h
didAppear
Action gets called when the view controller has appeared.
@property (nonatomic, copy) SCViewControllerAction_Block didAppear
Declared In
SCViewControllerActions.h
didDisappear
Action gets called when the view controller has disappeared.
@property (nonatomic, copy) SCViewControllerAction_Block didDisappear
Declared In
SCViewControllerActions.h
didDismiss
Action gets called when the view controller has been dismissed.
@property (nonatomic, copy) SCViewControllerAction_Block didDismiss
Declared In
SCViewControllerActions.h
didPresent
Action gets called when the view controller has appeared for the first time.
@property (nonatomic, copy) SCViewControllerAction_Block didPresent
Declared In
SCViewControllerActions.h
doneButtonTapped
Action gets called when the view controller’s Done button has been tapped. Return FALSE to ignore the tap, otherwise return TRUE.
@property (nonatomic, copy) SCViewControllerButtonTappedAction_Block doneButtonTapped
Discussion
Example:
action = ^BOOL(SCViewController *)viewController
{
// your code here
return TRUE; // accept the tap
}
Declared In
SCViewControllerActions.h
editButtonTapped
Action gets called when the view controller’s Edit button has been tapped. Return FALSE to ignore the tap, otherwise return TRUE.
@property (nonatomic, copy) SCViewControllerButtonTappedAction_Block editButtonTapped
Discussion
Example:
action = ^BOOL(SCViewController *)viewController
{
// your code here
return TRUE; // accept the tap
}
Declared In
SCViewControllerActions.h
willAppear
Action gets called when the view controller is about to appear.
@property (nonatomic, copy) SCViewControllerAction_Block willAppear
Declared In
SCViewControllerActions.h
willDisappear
Action gets called when the view controller is about to disappear.
@property (nonatomic, copy) SCViewControllerAction_Block willDisappear
Declared In
SCViewControllerActions.h