点击通知操作时iOS应用程序冻结

点击通知操作时iOS应用程序冻结,ios,objective-c,uiviewcontroller,appdelegate,unusernotificationcenter,Ios,Objective C,Uiviewcontroller,Appdelegate,Unusernotificationcenter,当点击UNUserNotificationCenter本地通知时,执行上述代码LSAddActivityViewController正在使用正确的UI启动,但应用程序冻结,应用程序上的任何地方都无法触摸 注意-关于方向更改的用户界面正被完美地重新绘制self.view.userinteractionenabled总是正确的。什么是LeadID,它是如何定义的?除此之外,我在这里看不到任何可疑的东西。可能是LSAddActivityViewController的实现出了问题?尝试删除它的所有功能,

当点击
UNUserNotificationCenter
本地通知时,执行上述代码<代码>LSAddActivityViewController正在使用正确的UI启动,但应用程序冻结,应用程序上的任何地方都无法触摸


注意-关于方向更改的用户界面正被完美地重新绘制
self.view.userinteractionenabled
总是正确的。

什么是
LeadID
,它是如何定义的?除此之外,我在这里看不到任何可疑的东西。可能是LSAddActivityViewController的实现出了问题?尝试删除它的所有功能,然后逐个添加,以查看冻结何时再次发生。@bbjay LeadID没有问题,LSAddActivityViewController实现有任何怀疑吗?如果推送一个空的UIViewController会发生什么情况?@bbjay如果UIViewController也是空的,它会挂起。什么是
LeadID
,它是如何定义的?除此之外,我在这里看不到任何可疑的东西。可能是LSAddActivityViewController的实现出了问题?尝试删除它的所有功能,然后逐个添加回去,以查看冻结何时再次发生。@bbjay LeadID没有问题,LSAddActivityViewController实现有任何怀疑吗?如果推一个空的UIViewController会发生什么情况?@bbjay如果UIViewController也是空的,它将挂起。
 -(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();
}