Last active
October 25, 2016 17:03
-
-
Save robertmryan/e1818a7e43c476d507408a2d6f3f5445 to your computer and use it in GitHub Desktop.
Follow up with Mukul More at http://stackoverflow.com/a/23891481/1271826
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ChildViewController: UIViewController { | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
print("ChildViewController.viewDidLoad") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
// in Swift 3 | |
override func prepare(for segue: UIStoryboardSegue, sender: Any?) { | |
print("ParentViewController.prepareForSegue: \(segue.identifier ?? "")") | |
} | |
// or in Swift 2 | |
// | |
// override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
// print("ParentViewController.prepareForSegue: \(segue.identifier ?? "")") | |
// } | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I did this with embed segue (i.e. I dragged "container view" from object library onto a storyboard scene, the output was: