我有一个应用程序,这个应用程序在Safari中打开一个URL。但是,如果用户点击左上角按钮返回我的应用程序,我该如何捕获此事件?
答案 0 :(得分:0)
对于这种情况,解决方案是查看UIApplicationWillEnterForegroundNotification
通知的控制器寄存器。发送此通知后,您可以执行所需的操作。
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doSomeStuff) name:UIApplicationWillEnterForegroundNotification object:nil];
-(void)doSomeStuff
{
//handle what you needed
}