Created
February 12, 2016 02:35
-
-
Save SimplGy/aa29ff4698c470af25c4 to your computer and use it in GitHub Desktop.
Sometimes you need to make sure init and deinit happen in the right order on your View Controllers, and you don't stand up two at once.
This file contains hidden or 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
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: NSBundle?) { | |
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil) | |
print("init nibName: \(self) \(unsafeAddressOf(self))") | |
} | |
required init?(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder) | |
print("init coder: \(self) \(unsafeAddressOf(self))") | |
} | |
deinit { | |
print("deinit coder: \(self) \(unsafeAddressOf(self))") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment