Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import UIKit
class ViewController: UIViewController {
@IBAction func unwind(segue: UIStoryboardSegue){
if segue.identifier == "goToSeconViewController" {
segue.source as! SecondViewController
}
}
override func viewDidLoad() {
super.viewDidLoad()
print("firstViewDidLoad")
}
override func viewWillAppear(_ animated: Bool) {
print("firstViewWillAppear")
}
override func viewDidAppear(_ animated: Bool) {
print("firstViewDidAppear")
}
override func viewWillDisappear(_ animated: Bool) {
print("firstviewWillDisappear")
}
override func viewDidDisappear(_ animated: Bool) {
print("firstviewDidDisappear")
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment