我有一個應用程序,其中任何人在回答問題時都會收到通知。所以當我收到通知並點擊它時,我必須轉到answerviewcontroller。 我正在使用下面的代碼。但是應用程序崩潰顯示「終止,因爲沒有系統應用程序」。手機重新啓動時帶有蘋果標誌。爲什麼???請幫忙終止,因爲從推送通知啓動時沒有系統應用程序
-(void)pushdetailsViewController
{
dispatch_async(dispatch_get_main_queue(), ^{
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle: nil];
QPYourQuestionController *controller = (QPYourQuestionController*)[mainStoryboard instantiateViewControllerWithIdentifier: @"yourQuestion"];
[[QPCommonClass initializeUserDefaults]setObject:[pushDictonary valueForKey:@"question_id"] forKey:@"currentquestionID"];
NSLog(@"Dictionary %@",pushDictonary);
UINavigationController *navigationController = (UINavigationController *)self.window.rootViewController;
[navigationController pushViewController:controller animated:YES];
});
}
爲什麼使用'dispatch_async'塊?嘗試刪除它 – iSashok