Instance Method


Determines whether the segue with the specified identifier should be performed.


- (BOOL)shouldPerformSegueWithIdentifier:(NSString *)identifier sender:(id)sender;



The string that identifies the triggered segue. In Interface Builder, you specify the segue’s identifier string in the attributes inspector. This string is used only for locating the segue inside the storyboard.


The object that initiated the segue. This object is made available for informational purposes during the actual segue.

Return Value

YES if the segue should be performed or NO if it should be ignored.


Subclasses can override this method and use it to perform segues conditionally based on current conditions. If you do not implement this method, all segues are performed.

See Also

Performing Segues

- prepareForSegue:sender:

Notifies the view controller that a segue is about to be performed.

- performSegueWithIdentifier:sender:

Initiates the segue with the specified identifier from the current view controller'€™s storyboard file.

- allowedChildViewControllersForUnwindingFromSource:

Returns an array of child view controllers to search for an unwind segue destination.

- childViewControllerContainingSegueSource:

Returns the child view controller that contains the source of the unwind segue.

- canPerformUnwindSegueAction:fromViewController:sender:

Called on a view controller to determine whether it responds to an unwind action.

- unwindForSegue:towardsViewController:

Called when an unwind segue transitions to a new view controller.