0

Hey I got a pretty low interval timer in my firstViewController which I would like to terminate when the app enters background, but how am I supposed to access it from my Applications AppDelegate file where the function is located. I know this is extremely dumb question, but I would appreciate help. Thanks!

4

1 回答 1

0

在您的 firstViewController 中,您将监听UIApplicationDidEnterBackgroundNotification

在 firstViewController 初始化方法中:

- (void)addObserver:(id)notificationObserver selector:(SEL)notificationSelector name:(NSString *)notificationName object:(id)notificationSender
于 2011-04-29T18:15:02.423 回答