iOS 从一个syoryBoard 跳转到另一个stroyBoard 方法简介
来源:互联网 发布:mac 画架构图工具 编辑:程序博客网 时间:2024/05/18 14:42
//在多个story中根据storyBoard 名字找到需要的主入口stroBoard 代码如下:
// Override point for customization after application launch.
[self.window makeKeyAndVisible];
//获取storyboard
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"LoginAndRegister" bundle:nil];
//获取入口的控制器
UIViewController *lavc = [storyboard instantiateInitialViewController];
//通过标示获取控制器
// UIViewController *lavc1 = [storyboard instantiateViewControllerWithIdentifier:<#(nonnull NSString *)#>]
[self.window.rootViewController presentViewController:lavc animated:YES completion:nil];
return YES;
}
//从一个storyBoard中某个页面 跳转到另一个storyBoard页面中的某一个页面:
//本例是从 Main页面中的storyBoard 中的哟个页面跳转到LoginAndRegiste storyBoard中的一个页面 在Main 页面中设置一个Button 再点击事件中实现跳转;需要注意的是没有NAvigation 的需要模态过去
- (IBAction)giveLogin:(id)sender {
//@"LoginAndRegister" 为storyBoard 名 @"login"为 需要跳转控制器在storBoard上的storyBoard ID (dianstory 右上第三个关联下面的ID ) LoginViewController
UIStoryboard *story = [UIStoryboard storyboardWithName:@"LoginAndRegister"bundle:nil];
UIViewController *login = [story instantiateViewControllerWithIdentifier:@"login"];
[self.navigationController pushViewController:login animated:YES];
}
0 0
- iOS 从一个syoryBoard 跳转到另一个stroyBoard 方法简介
- iOS从一个app跳转到另一个app
- 从一个action跳转到另一个action
- 从一个Activity跳转到另一个Activity
- 从一个app跳转到另一个app
- 从一个页面跳转到另一个页面
- 从一个应用程序跳转到另一个应用程序
- 从一个action跳转到另一个action
- IOS 从一个应用跳转另一个应用
- ios 从一个tabBar跳转另一个tabBar
- ios 从一个tabBar跳转另一个tabBar
- ios开发之如何从一个应用跳转到另一个应用(应用间跳转)
- iOS 从一个APP跳转到另一个APP,并带参数跳到指定页面
- SpringMVC中从一个控制器方法跳转到另一个控制器方法(亲测)
- struts2 从一个action 跳转到另一个action的两种方法
- struts2 从一个action 跳转到另一个action的两种方法
- struts2 从一个action 跳转到另一个action的两种方法
- struts2 从一个action 跳转到另一个action的两种方法
- <iframe width='738' height='523' class='preview-iframe' scrolling='no' frameborder='0' src='http://d
- 简单线程的实现
- 字符串中查找删除
- 副作用与顺序点
- 数组链表的简单实现
- iOS 从一个syoryBoard 跳转到另一个stroyBoard 方法简介
- MD5加密算法JAVA实现
- ——int64与long long的使用
- iOS面试 类的扩展,分类,延迟的方法,懒加载
- ListView(列表视图)的使用方法
- 升级Xcode7之后的适配问题(插件、ATS等)
- Android应用开发架构概述
- js判断手机和pc端选择不同执行事件的方法
- canvas,paint的用法