title: .dynamicType is deprecated. Use 'type(of ...)' instead
body: <p>I've just updated to Xcode 8 and iOS 10 (using legacy Swift Language Version).</p>
  
  <p>Trying to compile again my project has been an agony, even still using the old Swift syntax. This time one of my functions uses <code>NSBundle(forClass: self.dynamicType)</code> but now appears that <code>.dynamicType</code> is deprecated and Xcode doesn't even want to compile it.</p>
  
  <p>His suggestion is to use <code>type(of: self)</code> but that fails as well. Anyone knows the solution? Thanks.</p>