Where should I remove the observer for NSNotification in Swift, since viewDidUnload and dealloc() are unavailable?
NSNotification
viewDidUnload
dealloc()
Swift provides a deinit method that is called on instances of classes before they are destroyed.
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/Deinitialization.html