title: Swift NotificationCenter remove observer quickest way
body: <p>I am adding a number of observers in my <code>viewController</code> -- <code>applicationWillResignActive</code>, <code>applicationDidEnterBackground</code>, and many others. I want to remove <code>self</code> as observer to all registered notifications in one line. My question is whether the following line is enough to do that, or are there issues with this code?</p>
  
  <pre><code>deinit {
     NotificationCenter.default.removeObserver(self)
  }
  </code></pre>