segue使用及区别点
来源:互联网 发布:google网站数据统计 编辑:程序博客网 时间:2024/06/02 14:22
参考:https://developer.apple.com/library/ios/recipes/xcode_help-IB_storyboard/Chapters/StoryboardSegue.html
Xcode6中segue取消原push与modal选项后新增了其他的选项
几种segue:push、modal、popover、replace、cutom。
一。视图切换类型介绍
1.在iPhone和iPad中,segue的类型是不同的。
2.在iPhone中,segue有(3种):push、modal和custom三种不同的类型,这些类型的区别在与新页面出现的方式。
在iPad中,segue有(5种):push、modal、popover、replace、custom类型。
3.modal类型(模态转换):
a。最常用的场景,新的场景完全盖住了旧的那个。用户无法与上一个场景交互,除非他们先关闭这个场景。
b。它是在viewControllers中的标准切换方式,包括淡出什么的,可以切换动画。
c。ModalView:就是会弹出一个view,你只能在该view上操作,而不能切换到其他的view,除非你关闭了modalView。
ModalView对应的segue type就是modal segue。
当user在弹出的modalView里操作完成后,就应该dismiss the modal view scene然后切换后原视图。
4.Push类型:
a。一般需要头一个界面是Navigation Controller的,它是在navigation View Controller中下一级时使用的那种从右侧划入的方式。
b。该类型是和navigation viewcontrollers一起使用。
5.Popover类型:
采用浮动窗口的形式把新页面显示出来。
6.Replace类型:
替换当期的scene。
7.Cutom类型:
自定义跳转方式。
************************
二。segue之间的数据传递
三。ViewController之间的跳转
1.如果在storyboard中当前的ViewController和要跳转的ViewController之间的segue之间存在,则可以执行performSegueWithIdentifier:sender:这个方法实现跳转。
比如:
[self performSegueWithIdentifier:@"go" sender:self];
其中,go为自己定义的segue标识符。
2.如果目标ViewController存在Storyboard中,但是没有segue。你可以通过UIStoryboard的instantiateViewControllerWithIdentifier:这个方法获取到它,然后你再用想要的方式实现跳转,如:压栈。
3.如果目标ViewController不存在,那就去创建它吧。
0 0
- segue使用及区别点
- UINavigationController及Segue的使用
- Segue区别及视图的切换
- IOS--- Segue区别及视图的切换
- 灵活使用segue导航
- 灵活使用segue导航
- StoryBoard segue 使用步骤
- Segue使用总结
- iOS Segue使用
- Storyboard里面的几种Segue区别及视图的切换
- [ios] Storyboard里面的几种Segue区别及视图的切换
- iOS normal segue 与 unwind segue 的区别
- SEGUE
- Segue
- iOS中使用storyboard实现页面跳转,Segue详解及简单的数据传递
- 代理的使用及-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
- Storyboard-segue的使用
- IOS中Segue的使用
- 点滴
- 创建存储过程和java调用存储过程
- 在Windows下安装Hadoop
- Linux负载均衡环境搭建-3 配置nginx为负载均衡前置
- 设计模式之静态代理设计模式
- segue使用及区别点
- ALV GRID 响应回车事件修改内容
- UI之tableView的两个协议UITableViewDataSource、UITableViewDelegate
- JS中的双向数据绑定及Object.defineProperty方法
- 1029. Median (25)
- 获知局域网内他人的上网数据和行为
- IOS NSString 装 NSData两种方式的不同
- Javascript面向对象编程(二):构造函数的继承
- 用Button子类化封装假的分段控件