Notifies the view controller that a segue is about to be performed.
- iOS 5.0+
- Mac Catalyst 13.0+
- tvOS 9.0+
The segue object containing information about the view controllers involved in the segue.
The object that initiated the segue. You might use this parameter to perform different actions based on which control (or other object) initiated the segue.
The default implementation of this method does nothing. Subclasses override this method and use it to configure the new view controller prior to it being displayed. The segue object contains information about the transition, including references to both view controllers that are involved.
Because segues can be triggered from multiple sources, you can use the information in the
sender parameters to disambiguate between different logical paths in your app. For example, if the segue originated from a table view, the sender parameter would identify the table view cell that the user tapped. You could then use that information to set the data on the destination view controller.