Skip to content

Instantly share code, notes, and snippets.

@paulrehkugler
Last active January 2, 2016 04:08
Show Gist options
  • Save paulrehkugler/8248123 to your computer and use it in GitHub Desktop.
Save paulrehkugler/8248123 to your computer and use it in GitHub Desktop.
/* MyModelObject.h */
@interface MyModelObject : NSObject
// this data is "publicly" immutable
@property (nonatomic, readonly) NSArray *someData;
@end
/* MyModelObject.m */
@interface MyModelObject()
// allow this data to be "privately" mutable
@property (nonatomic, readwrite) NSMutableArray *someData;
// don't expose this method publicly
- (void) process;
@end
@implementation
- (void) process {
// do some processing steps here
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment