当用户将应用程序带到前台时,我想让我的应用程序再次调用 viewDidAppear。
- (void)appReturnsActive{
//THIS IS THE BIT THAT DOESNT WORK, BUT [self.viewDidLoad] DOES WORK
[self.viewDidAppear];
}
我正在像这样在我的 viewDidAppear 方法中创建 appReturnsActive 。它运作良好:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(appReturnsActive) name:UIApplicationDidBecomeActiveNotification
object:nil];
我可以做self.viewDidLoad,但我不能选择viewDidAppear。有谁知道我怎样才能让它工作?
谢谢!!