title: Unable to find specific subclass of NSManagedObject
body: <p>I'm working on developing an app with Core Data. When I created an instance using:</p>
  
  <pre><code>let entity = NSEntityDescription.entityForName("User", inManagedObjectContext: appDelegate.managedObjectContext)
  let user = User(entity: entity, insertIntoManagedObjectContext: appDelegate.managedObjectContext)
  </code></pre>
  
  <p>I got a warning in log:</p>
  
  <pre><code>CoreData: warning: Unable to load class named 'User' for entity 'User'.  Class not found, using default NSManagedObject instead.
  </code></pre>
  
  <p>How could I fix it?</p>
  
  <p>And another question, how can I define an instance method in NSManagedObject subclass?</p>
  
  <p>Edit:</p>
  
  <p>I have specified class of the entity as in the following screenshot:</p>
  
  <p><img src="https://i.stack.imgur.com/pKQOm.png" alt="enter image description here"></p>