Instance Method

initWithIdentifier:source:destination:

Initializes and returns a storyboard segue object for use in performing a segue.

Declaration

- (instancetype)initWithIdentifier:(NSString *)identifier source:(UIViewController *)source destination:(UIViewController *)destination;

Parameters

identifier

The identifier you want to associate with this particular instance of the segue. You can use this identifier to differentiate one type of segue from another at runtime.

source

The view controller visible at the start of the segue.

destination

The view controller to display after the completion of the segue.

Return Value

An initialized segue object.

Discussion

This method is the designated initializer for segue objects. If you subclass UIStoryboardSegue, you can override this method and perform any custom initialization in your implementation. Your implementation should call super first and then proceed if that method does not return nil.

See Also