你怎么能推到另一个视图控制器没有prepareForSegue
?不需要推到另一个视图控制器没有prepareForSegue
myClassVC *viewController = [myClassVC alloc];
UIStoryboardSegue *segue = [[UIStoryboardSegue alloc] initWithIdentifier:@"pushToMyVC" source:self destination:viewController];
if ([segue.identifier isEqualToString:@"pushToMyVC"]) {
NSLog(@"logging");
myClassVC *viewController = (myClassVC *)[segue destinationViewController];
[self presentViewController:viewController animated:YES completion:nil];
}
这个答案非常有用! – Plagorn 2016-11-01 08:52:25