Skip to content

Instantly share code, notes, and snippets.

@PaulTaykalo
Last active August 29, 2015 14:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PaulTaykalo/1b3d9d7837dac390fa40 to your computer and use it in GitHub Desktop.
Save PaulTaykalo/1b3d9d7837dac390fa40 to your computer and use it in GitHub Desktop.
Person model example
@interface PersonModel : NSObject
// Current person
@property(nonatomic, readonly) Person *person;
// Creates model for working with specified person
- (id)initWithPerson:(Person *)person;
// Follows current person
// Calls specified block.
// Result block can be called more than once
- (void)follow:(void (^)(Person *person, NSError *error))resultBlock;
// Unnfollows current person
// Calls specified block.
// Result block can be called more than once
- (void)unfollow:(void (^)(Person *person, NSError *error))resultBlock;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment