通知到达时,从AppDelegate显示视图控制器

时间:2015-07-28 13:21:53

标签: ios objective-c storyboard

我想显示UIViewController内的UIStoryboard。弹出视图没有任何问题。但导航在弹出视图控制器中不起作用;比如当我触摸按钮时

 [self.navigationController popViewControllerAnimated:YES];

我在AppDelegate - >中使用该代码didReceiveRemoteNotification方法

 UIStoryboard *mystoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
 PFProfileInfoVC *viewcontroller = [mystoryboard instantiateViewControllerWithIdentifier:@"SBID_ProfileVC"];
 viewcontroller.strAuthorID = [userInfo objectForKey:@"aps"][@"targetId"];
 [self.window.rootViewController presentViewController:viewcontroller animated:YES completion:nil];

谢谢,

1 个答案:

答案 0 :(得分:1)

使用 SUBSTR(ACN.ACCOUNTNUMBER,0,3) ='321' 时,viewController不会被推送到导航堆栈。通常,它以模态呈现。因此,如果您想解雇它,请使用

presentViewController