How to use NSOperationQueue


/ Published in: Objective C
Save to your folder(s)



Copy this code and paste it in your HTML
  1. @interface PersonTableViewController : UITableViewController <AddPerson> {
  2. }
  3. @end
  4.  
  5. @implementation PersonTableViewController
  6.  
  7. - (void)addPerson:(NSString *)username {
  8. NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(addPersonInBackground:) object:username];
  9. [queue addOperation:operation];
  10. [operation release];
  11. }
  12. @end

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.