Objective c 使用xib ios7从presentviewcontroller准备推送序列
如何使用XIB objective-c从presentviewcontroller准备点击按钮的顺序?我试图翻滚给定的代码,但它不工作Objective c 使用xib ios7从presentviewcontroller准备推送序列,objective-c,ios7,xcode6,xib,Objective C,Ios7,Xcode6,Xib,如何使用XIB objective-c从presentviewcontroller准备点击按钮的顺序?我试图翻滚给定的代码,但它不工作 PushViewController *puvc=[[PushViewController alloc]initWithNibName:@"PushViewController" bundle:nil]; UINavigationController *nvc = [[UINavigationController alloc] initWithRootView
PushViewController *puvc=[[PushViewController alloc]initWithNibName:@"PushViewController" bundle:nil];
UINavigationController *nvc = [[UINavigationController alloc] initWithRootViewController:puvc];
[self.navigationController pushViewController:nvc animated:YES];
您的_SEGUE_NAME_这里是您在XIB文件中设置的SEGUE的标识符。
这对我有帮助。希望能有帮助
PushViewController *puvc=[[PushViewController alloc]initWithNibName:@"PushViewController" bundle:nil];
[self.navigationController pushViewController:puvc animated:YES];
使用此代码
[self presentViewController:navigationController
animated:YES
completion:nil];
我如何在xib中设置segue标识符??你在使用故事板吗?xib非常混乱,但我必须这样做,因为这是我的任务。你是否在appDelegate文件中使用UINavigationController来设置根视图控制器。如果是,则无需编写UINavigationController,只需查看我已编辑我的答案。是的,我使用了它,但导航栏不会显示在presentviewcontroller上,对吗?我想从presentviewcontroller导航
[self presentViewController:navigationController
animated:YES
completion:nil];