【发布时间】:2014-02-25 13:17:06
【问题描述】:
我有两个视图控制器,V1 和 V2。 V1 在情节提要中为 V2 提供了模态转场。然后我有一个放松的 segue,将 V2 解散到 V1。然后调用下面的完成操作。它打印出正确的 NSLog,但是 [self performSegueWithIdentifier:@"viewmessagessegue" sender:self] 没有被启动。当按下 V1 中的按钮时,我使用同一行代码,并且它在该场景中正常工作。我很困惑为什么它没有被调用......
- (IBAction)done:(UIStoryboardSegue *)segue {
SendToViewController *cc = [segue sourceViewController];
_users = cc.recipients;
NSLog(@"users: %@",_users"); // has the correct data
[self performSegueWithIdentifier:@"viewmessagessegue" sender:self];
NSLog(@"perform segue...:"); // this gets printed
}
【问题讨论】:
标签: ios objective-c storyboard modalviewcontroller uistoryboardsegue