0

我的应用在 iOS 15.1 之前运行良好。然而,一旦 15.1 发布,我就遇到了这个奇怪的崩溃,它给出了一个错误“在从主线程访问后,不得从后台线程执行对布局引擎的修改”。调试时弹出的代码是这样的。有什么想法吗?

 NSLog(@"HAQuizPurchaseCategoriesViewController");
            [HAUtilities playTapSound];
            HAQuizPurchaseCategoriesViewController* controller = [[HAQuizPurchaseCategoriesViewController alloc] initWithNibName:@"HAQuizPurchaseCategoriesViewController" bundle:nil];
            controller._quizCategoriesArray = categories;
            UINavigationController* navController = [[UINavigationController alloc] initWithRootViewController:controller];
            dispatch_async(dispatch_get_main_queue(), ^{
              // offending code goes in here
                [self presentViewController:navController animated:YES completion:^{
                              
                          }];
            });
4

0 回答 0