State Transitions


#1

There are not working…
…and theres nothing more simple, right?

[code]

  • (void)applicationWillEnterForeground:(UIApplication *)application
    {
    NSLog(@"%@", NSStringFromSelector(_cmd));
    }

  • (void)applicationDidBecomeActive:(UIApplication *)application
    {
    NSLog(@"%@", NSStringFromSelector(_cmd));
    }

  • (void)applicationWillTerminate:(UIApplication *)application
    {
    NSLog(@"%@",NSStringFromSelector(_cmd));
    }[/code]


#2

To simplify it further, roll a pretty-function macro:

#define MY_Log()  NSLog (@"%s", __PRETTY_FUNCTION__)

- (void)applicationWillEnterForeground:(UIApplication *)application
{
   MY_Log ();
}

- (void)applicationDidBecomeActive:(UIApplication *)application
{
   MY_Log ();
}

- (void)applicationWillTerminate:(UIApplication *)application
{
   MY_Log ();
}

#3

Sorry, what I ment is…nothing is printed in the log!!


#4

Oops. I should have read it more carefully.

Do you get logs printed elsewhere? For example, in application:didFinishLaunchingWithOptions: in your App Delegate? Maybe those methods are not being invoked.


#5

nop…nothing!