Initializes and returns a storyboard segue object for use in performing a segue.
SDKs
- iOS 5.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
Framework
- UIKit
Declaration
- (instancetype)initWithIdentifier:(NSString *)identifier source:(UIView Controller *)source destination:(UIView Controller *)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 UIStoryboard
, 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
.