首页 > 学院 > 开发设计 > 正文

storyboard总结

2019-11-14 17:58:40
字体:
来源:转载
供稿:网友

1.storyboard 布局时用代码实现页面跳转:

  a> 获取当前 storyboard : [self storyboard]

  b> 为将要跳转到的 viewController 添加 storyboard ID

  c> 通过 当前storyboard 和 将要跳转到的页面id (storyboard ID) , 获取要跳转的 UIViewController

  d> 通过 push 或者 模态 方式实现跳转

  例子:  UIViewController *vc = [[self storyboard] instantiateViewControllerWithIdentifier:@"loginBoard"];
            [self.navigationController pushViewController:vc animated:YES];

 

 

 

 

 


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表