title: How to make a designated initializer for NSManagedObject subclass in Swift?
body: <pre><code>class Alternative: NSManagedObject {
  
      @NSManaged var text: String
      @NSManaged var isCorrect: Bool
      @NSManaged var image: NSData
  } 
  
  convenience init(text: String, isCorrect: Bool, entity: NSEntityDescription, insertIntoManagedObjectContext context: NSManagedObjectContext!) {
          let alternative = Alternative(entity: entity, insertIntoManagedObjectContext: context) as Alternative
          alternative.text = text
          alternative.isCorrect = isCorrect
          return alternative
  }
  </code></pre>
  
  <p>I want to make a method that lets me initialize new objects with this call:</p>
  
  <pre><code>let newAlternative = Alternative("third platform", True, entityDescription, managedObjectContext)
  </code></pre>
  
  <p>But i get the error: </p>
  
  <pre><code>Convenience initializer for Alternative must delegate with self.init
  </code></pre>
  
  <p>What do i need to change in my initalizer to make my example usage work?</p>