Created
April 28, 2014 18:31
-
-
Save averydev/11380185 to your computer and use it in GitHub Desktop.
ViewController template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma mark - Standard VC state management | |
- (void)viewDidLoad | |
{ | |
[super viewDidLoad]; | |
/* | |
One-time setup tasks here | |
*/ | |
} | |
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
// Register for notification. | |
[self refresh]; | |
} | |
- (void)viewWillDisappear:(BOOL)animated | |
{ | |
[super viewWillDisappear:animated]; | |
[[NSNotificationCenter defaultCenter] removeObserver:self]; | |
//Cleanup | |
} | |
- (void)refresh | |
{ | |
// Fetch data. | |
} | |
- (void)didReceiveMemoryWarning | |
{ | |
[super didReceiveMemoryWarning]; | |
// Dispose of any resources that can be recreated. | |
} | |
#pragma mark - Notification handling | |
/* | |
Handle notifications here - reload tables, etc. | |
- (void)fetchedObject:(NSNotification*)notification | |
{ | |
PLObject *object = [[notification userInfo] objectForKey:PLFetchedObjectNotification]; | |
} | |
*/ | |
#pragma mark - Event handling | |
/// Handle Events. | |
#pragma mark - Delegates | |
//Delegate Methods | |
#pragma mark - Helpers | |
//Helpers. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment