title: Subclassing NSObject in Swift - Best Practice with Initializers
body: <p>Here is the layout of an example Class, can someone guide me on what's best practice when creating a subclass of NSObject?</p>
  
  <pre><code>class MyClass: NSObject {
  
      var someProperty: NSString! = nil
  
      override init() {
          self.someProperty = "John"
          super.init()
      }
  
      init(fromString string: NSString) {
          self.someProperty = string
          super.init()
      }
  
  }
  </code></pre>
  
  <p>Is this correct, am I following best practice here?</p>
  
  <p>I wonder if I'm correctly setting up the initializers (one that sets the string to a default, and one which I can pass in a string)?</p>
  
  <p>Should I call <code>super.init()</code> at the end of each of the initializers?</p>
  
  <p>Should my more <strong>specific</strong> (the one that takes a string) initializer simply call <code>self.init()</code> at the end rather than <code>super.init()</code>?</p>
  
  <p>What is the right way to set up the initializers in Swift when subclassing <code>NSObject</code>? - and how should I call the super init ?</p>
  
  <p>This question (albeit in Objective C) suggests you should have an init, which you always call and simply set the properties in more specific inits: <a href="https://stackoverflow.com/questions/2026914/objective-c-multiple-initialisers">Objective-C Multiple Initialisers</a></p>