title: Custom init parse.com
body: <p>I'm writing some class with is subclass of PFObject (Parse.com).</p>
  
  <p>Example:
  LBSomeClass.h</p>
  
  <pre><code>@interface LBSomeClass : PFObject
  @propertise (strong,nonatomic) NSString* prop1;
  @propertise (strong,nonatomic) NSString* prop2;
  -(id)init;
  -(id)initWithId:(NSString*)uid;
  @end
  </code></pre>
  
  <p>LBSomeClass.m</p>
  
  <pre><code>@implementation LBPhoto
  @synthesize prop1;
  @synthesize prop2;
  
  -(id)init {
  self = [super init];
  return self;
  }
  
  -(id)initWithId:(NSString*)uid {
  self = [super init];
  PFQuery* query = [PFQuery queryWithClassName:@"someclass"];
  self = (LBSomeClass*)[query getObjectWithId:uid];
  
  self.prop1 = [self objectForKey:@"propertiseone"]; //error here
  self.prop2 = [self objectForKey:@"propertisetwo"]; //error here
  
  return self;
  }
  </code></pre>
  
  <p>But when i run, there're some error: </p>
  
  <pre><code>[PFObject setProp1:]: unrecognized selector sent to instance 0xa2707d0
  Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PFObject setProp1:]: unrecognized selector sent to instance 0xa2707d0'
  </code></pre>
  
  <p>Can you help me to solve that? Thanks so much!!!</p>
  
  <p><strong>Problems solved!!!</strong></p>
  
  <pre><code>-(id)initWithId:(NSString*)uid {
  self = [super initWithClassName:@"Photo"];
  [self setObjectId:targetID];
  
  [self fetch];
  
  self.prop1 = [self objectForKey:@"propertiseone"];
  // other
  }
  </code></pre>