Difference Segue Excute in Container View to AVPlayerViewController
1. Difference Segue Excute in Container View to AVPlayerViewController
Demo on GitHub
Objective-C this method won’t be execute.
1 | // In Swift should check the method, even user don't tap the cantainer view. |
1 | // BEGIN avkit_ios_config |
2. Conclusion
- Swift + Container View(In IB)
- Objective-C + AVPlayerLayer (In Code)
3. Definiton
- prepareForSegue:sender:
Notifies the view controller that a segue is about to be performed.
###Discussion
The default implementation of this method does nothing. Your view controller overrides this method when it needs to pass relevant data to the new view controller. The segue object describes the transition and includes references to both view controllers involved in the segue.
Because segues can be triggered from multiple sources, you can use the information in the segue and 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 use that information to set the data on the destination view controller.