Code School - iOS Operation Models #1
iOS Operation: Models - Code School
LEVEL 1
- NSObject
- NSObject -> UIResponder -> UIViewController -> UITabBarController, UINavigatioinController
- AppDelegate -> 3 controllers on tab
- Foundation.h
- @interface
- @property
- @implementation
- (id)init
- self = [super init]; return self;
- (id)init
- handling property
- aPlace.name OR [aPlace name];
- Object Instantiation with properties
- initWithName: description:
- if(self) <- verify [super init]; worked before
- (id)init self.initWithName:@"defaultName" ...
- Model conventions
- (strong, nonatomic
- Arguments starts from 'a', 'an', 'the'
- initWithCity:(NSString *)aCity
- align lined up colons
LEVEL 2
- Fetching data
- AFJSONRequestOperatioin
- self.cityData = JSON -> initWithJSON (City.m)
- [self dataRetrieved]
- Networkingも含めてinitでやってしまう
- Notification
- NotificationCenter defaultCenter
- addObserver, selector
スニペットをドラッグアンドドロップできるようになった