1
 -(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler{

 dispatch_async(dispatch_get_main_queue(), ^{
 LSAddActivityViewController *addVC = [[LSAddActivityViewController alloc]init];
           addVC.leadID = LeadID;
           addVC.activityType = @"Notable Activity";
           [((UINavigationController *)self.window.rootViewController) 
           pushViewController:addVC animated:YES];

});
completionHandler();
}

UNUserNotificationCenter上面的代码在本地通知上点击 Action 时执行。LSAddActivityViewController正在使用正确的 UI 启动,但应用程序冻结,在应用程序的任何地方都没有触摸。

注意 - 在方向更改时 UI 正在完美地重新绘制。self.view.userInterationEnabled永远是真的。

4

0 回答 0