以前采用纯代码,对各个不同页面控制器之间进行跳转。有两种方式:(1)push(2)present ;
现在使用storyboard,对于跳转也总结两几点:
(1)用segue进行跳转,在prepareForSegure里面写跳转代码。er isEqualToString:@"PushContractController"]) {
<span style="font-size:18px;"> ContractController *controller = segue.destinationViewController;
controller.delegate = self;
//这里可以传递参数
}</span>
(2)用identify ID进行跳转
<span style="font-size:18px;">- (void)tapAction{
UIStoryboard *storyboard = [[UIStoryboard alloc] init];
SuiXinCunContractController *controller = [storyboard instantiateViewControllerWithIdentifier:@"controllerIdentifier"];
controller.delegate = self;
//这里可以传递参数
[self.navigationController pushViewController:controller animated:YES];
}</span>