I try to do something when the home button and power button has been clicked. I am developing in iOS.
This is the code I use:
- (void)viewDidDisappear:(BOOL)animated{
[super viewDidDisappear:animated];
NSLog(@"viewDidDisappear");
}
- (void)viewWillDisappear:(BOOL)animated{
[super viewWillDisappear:animated];
NSLog(@"viewWillDisappear");
}
- (void)applicationFinishedRestoringState{
NSLog(@"applicationFinishedRestoringState");
}
Why is the above function not being called when I click the power button or home button on the iPhone?
Did I miss something?