Preparing your view controller before a triggering a Segue

suggest change

PrepareForSegue:

func prepareForSegue(_ segue:UIStoryboardSegue, sender sender:AnyObject?)
Notifies the view controller that a segue is about to be performed

Parameters

segue: The segue object.

sender: The object that initialized the segue.

Example in Swift

Perform a task if the identifier of the segue is ‚ÄúSomeSpecificIdentifier‚ÄĚ

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    if segue.identifier == "SomeSpecificIdentifier" {
        //- Do specific task
    }
}

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents