UIViewController 中常见时序记录(layoutSubViews 与 XXXXappear/disappear 相关)
来源:互联网 发布:武则天和慈禧 知乎 编辑:程序博客网 时间:2024/06/11 23:34
1. UIViewController 中 layoutSubViews 的时序
假如 UIViewController 中的 Xib 中的尺寸是 (375, 667)。
- iOS 8.x 的 5S 设备上的时序如下:
2016-04-05 15:43:23.637 AutoLayoutDemo[2185:1619209] after super viewDidLoad: {{0, 0}, {375, 667}}2016-04-05 15:43:23.638 AutoLayoutDemo[2185:1619209] before super viewWillAppear: {{0, 0}, {320, 568}}2016-04-05 15:43:23.638 AutoLayoutDemo[2185:1619209] after super viewWillAppear: {{0, 0}, {320, 568}}2016-04-05 15:43:23.644 AutoLayoutDemo[2185:1619209] before super viewWillLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:43:23.644 AutoLayoutDemo[2185:1619209] after super viewWillLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:43:23.644 AutoLayoutDemo[2185:1619209] before super updateViewConstraints: {{0, 0}, {320, 568}}2016-04-05 15:43:23.645 AutoLayoutDemo[2185:1619209] after super updateViewConstraints: {{0, 0}, {320, 568}}2016-04-05 15:43:23.645 AutoLayoutDemo[2185:1619209] before super viewDidLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:43:23.645 AutoLayoutDemo[2185:1619209] after super viewDidLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:43:24.147 AutoLayoutDemo[2185:1619209] before super viewDidAppear: {{0, 0}, {320, 568}}2016-04-05 15:43:24.147 AutoLayoutDemo[2185:1619209] after super viewDidAppear: {{0, 0}, {320, 568}}2016-04-05 15:43:24.148 AutoLayoutDemo[2185:1619209] before super viewWillLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:43:24.148 AutoLayoutDemo[2185:1619209] after super viewWillLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:43:24.148 AutoLayoutDemo[2185:1619209] before super updateViewConstraints: {{0, 0}, {320, 568}}2016-04-05 15:43:24.148 AutoLayoutDemo[2185:1619209] after super updateViewConstraints: {{0, 0}, {320, 568}}2016-04-05 15:43:24.148 AutoLayoutDemo[2185:1619209] before super viewDidLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:43:24.148 AutoLayoutDemo[2185:1619209] after super viewDidLayoutSubviews: {{0, 0}, {320, 568}}
- iOS 9.x 的 5S 设备上的时序如下:
2016-04-05 15:50:38.560 AutoLayoutDemo[2464:1661823] after super viewDidLoad: {{0, 0}, {375, 667}}2016-04-05 15:50:38.560 AutoLayoutDemo[2464:1661823] before super viewWillAppear: {{0, 0}, {375, 667}}2016-04-05 15:50:38.561 AutoLayoutDemo[2464:1661823] after super viewWillAppear: {{0, 0}, {375, 667}}2016-04-05 15:50:38.565 AutoLayoutDemo[2464:1661823] before super updateViewConstraints: {{0, 0}, {320, 568}}2016-04-05 15:50:38.566 AutoLayoutDemo[2464:1661823] after super updateViewConstraints: {{0, 0}, {320, 568}}2016-04-05 15:50:38.566 AutoLayoutDemo[2464:1661823] before super viewWillLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:50:38.566 AutoLayoutDemo[2464:1661823] after super viewWillLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:50:38.566 AutoLayoutDemo[2464:1661823] before super viewDidLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:50:38.567 AutoLayoutDemo[2464:1661823] after super viewDidLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:50:39.072 AutoLayoutDemo[2464:1661823] before super viewDidAppear: {{0, 0}, {320, 568}}2016-04-05 15:50:39.072 AutoLayoutDemo[2464:1661823] after super viewDidAppear: {{0, 0}, {320, 568}}2016-04-05 15:50:39.073 AutoLayoutDemo[2464:1661823] before super updateViewConstraints: {{0, 0}, {320, 568}}2016-04-05 15:50:39.073 AutoLayoutDemo[2464:1661823] after super updateViewConstraints: {{0, 0}, {320, 568}}2016-04-05 15:50:39.073 AutoLayoutDemo[2464:1661823] before super viewWillLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:50:39.073 AutoLayoutDemo[2464:1661823] after super viewWillLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:50:39.073 AutoLayoutDemo[2464:1661823] before super viewDidLayoutSubviews: {{0, 0}, {320, 568}}2016-04-05 15:50:39.073 AutoLayoutDemo[2464:1661823] after super viewDidLayoutSubviews: {{0, 0}, {320, 568}}
2. UIViewController 中 XXXXappear/disappear 的时序
- VCA push VCB:
VCA========viewWillDisappear:VCB========viewWillAppear:VCA========viewDidDisappear:VCB========viewDidAppear:
- VCB pop to VCA:
VCB========viewWillDisappear:VCA========viewWillAppear:VCB========viewDidDisappear:VCA========viewDidAppear:
- VCA present to VCB
VCA========viewWillDisappear:VCB========viewWillAppear:VCB========viewDidAppear:VCA========viewDidDisappear:
- VCB dismiss to VCA
VCB========viewWillDisappear:VCA========viewWillAppear:VCA========viewDidAppear:VCB========viewDidDisappear:
UITabController 中 VCA(UINavigationController 的 rootViewController) 切换到 VCB(UINavigationController 的 rootViewController) 的 tab:
- VCB 所在 tab 第一次切换过去:
VCA========viewWillDisappear:VCB========viewWillAppear:VCA========viewDidDisappear:VCB========viewDidAppear:
- VCB 所在 tab 之前切换过去过:
VCB========viewWillAppear:VCA========viewWillDisappear:VCA========viewDidDisappear:VCB========viewDidAppear:
阅读全文
0 0
- UIViewController 中常见时序记录(layoutSubViews 与 XXXXappear/disappear 相关)
- UIViewController中layoutSubViews的时序记录
- disappear
- layoutSubviews相关总结
- layoutSubviews相关信息
- 在UIView中与UIViewController中画图
- UIViewController——Handling View-Related Notifications(处理与视图相关的通知)
- 关于iOS 中UIViewController的生命周期以及相关视图(View)的探讨
- UITableViewController与UIViewController中使用UITableView
- S5pv210 LCD 驱动 时序相关(转)
- 时序分析/约束(一):相关概念
- 时序分析/约束(一):相关概念
- 组件与相关记录
- 优秀工程师-layoutSubviews相关方法
- setNeedsLayout与layoutSubviews
- layoutsubviews 与drawRect
- layoutSubviews与drawRect
- layoutSubviews与drawRect
- Struts2-01
- 51Nod 1016 水仙花数 V2
- ONOS安装及编译步骤(附编译出现问题的几种解决方法)
- ARKit如何将太阳系装进iPhone
- 深入理解Android消息机制
- UIViewController 中常见时序记录(layoutSubViews 与 XXXXappear/disappear 相关)
- jquery操作样式
- bzoj2243 [SDOI2011]染色 树链剖分
- yii 基于php的Rbac权限控制
- thriftserver&beeline的使用
- noi-7912-笨小猴
- Codeforces Testing Round #14 (Unrated)
- 基于.NET平台常用的框架整理
- manacher&&后缀数组