我認爲控制器之一,我已插入以下代表:UI應用代表沒有被調用
- (void)applicationWillResignActive:(UIApplication *)application
{
NSLog(@"Application Did Resign Active");
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
NSLog(@"Application Did Enter Background");
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
NSLog(@"Application Will Enter Foreground");
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
NSLog(@"Application Did Become Active");
}
的NSLog是顯示無來者被調用的代表。這是爲什麼發生?我怎樣才能解決這個問題?
您需要將這些代表置於'AppDelegate'中,它們將在那裏調用。 –