For The More Curious: Application State Transitions
Let’s write some quick code to get a better understanding of the different application state transitions.
You already know about self, an implicit variable that points to the instance that is executing the current method. There is another implicit variable called _cmd, which is the selector for the current method. You can get the NSString representation of a selector with the function NSStringFromSelector.
In HomepwnerAppDelegate.m, implement the application state transition delegate methods so that they print out the name of the method. You’ll need to add four more methods. (Check to make sure the template hasn’t already created these methods before writing brand new ones.)
- (void)applicationWillResignActive:(UIApplication ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access