ViewController启动加载过程

ViewController加载过程(ShowViewCycle是ViewController.view的subView):

1. -[ViewController initWithNibName:bundle:] [Line 82] nibNameOrNil:(null), nibBundleOrNil:(null)

  ViewController初始化方法, ViewController安一下顺序在 mainBundle 中 (因第二个参数 nibBundle 也指定为 nil) 搜索 NIB 文件:

    参数nibBundleOrNil:指定nib文件搜索的bundle,默认位mainBundle

    参数nibNameOrNil:指定nib文件的名称,如果不指定,则先搜索View.nib,再搜索 ViewController.nib

2. -[ViewController loadView] [Line 100]

  在self.view==nil的条件下调用

3. -[ViewController willMoveToParentViewController:] [Line 363]

  3.1 -[ShowViewCycle initWithFrame:] [Line 49]

  3.2 -[ShowViewCycle setNeedsDisplay] [Line 259]

    ShowViewCycle的属性改变都会触发setNeedsDisplay

  3.3 -[ShowViewCycle setNeedsDisplay] [Line 259]

  3.4 -[ShowViewCycle setNeedsDisplay] [Line 259]

  3.5 -[ShowViewCycle willMoveToSuperview:] [Line 174]

  3.6 -[ShowViewCycle didMoveToSuperview] [Line 181]

  3.7 -[ShowViewCycle setTranslatesAutoresizingMaskIntoConstraints:]

    mas_makeConstraints主动触发

  3.8 -[ShowViewCycle isDescendantOfView:] [Line 200]

    addConstraint,会触发该判定,判定一个view是否是另一个view的subview

  3.9 -[ShowViewCycle isDescendantOfView:] [Line 200]

  3.10-[ShowViewCycle isDescendantOfView:] [Line 200]

  3.11-[ShowViewCycle isDescendantOfView:] [Line 200]

4. -[ViewController viewDidLoad] [Line 107]

5. -[ViewController shouldAutomaticallyForwardAppearanceMethods] [Line 336]

  返回值如果是NO,子类必须重写- viewWillAppear: -viewDidAppear: -viewWillDisappear: -viewDidDisappear: -willRotateToInterfaceOrientation:duration:  -willAnimateRotationToInterfaceOrientation:duration: -didRotateFromInterfaceOrientation:方法

6. -[ViewController viewWillAppear:] [Line 159]

7. -[ViewController beginAppearanceTransition:animated:] [Line 298]

8. -[ViewController shouldAutomaticallyForwardAppearanceMethods] [Line 336]

  8.1 -[ShowViewCycle willMoveToWindow:] [Line 188]

  8.2 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  8.3 -[ShowViewCycle needsUpdateConstraints] [Line 375]

  8.4 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  8.5 -[ShowViewCycle isDescendantOfView:]

  8.6 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  8.7 -[ShowViewCycle isDescendantOfView:] [Line 200]

  8.8 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  8.9 -[ShowViewCycle isDescendantOfView:] [Line 200]

  8.10-[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  8.11-[ShowViewCycle isDescendantOfView:] [Line 200]

  8.12-[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  8.13-[ShowViewCycle didMoveToWindow] [Line 195]

9. -[ViewController viewWillLayoutSubviews] [Line 188]

  9.1 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  9.2 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  9.3 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  9.4 -[ShowViewCycle intrinsicContentSize] [Line 451]

    内在内容的大小

  9.5 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  9.6 -[ShowViewCycle updateConstraints] [Line 370]

  9.7 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  9.8 -[ShowViewCycle alignmentRectInsets] [Line 434]

  9.9 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  9.10-[ShowViewCycle alignmentRectInsets] [Line 434]

  9.11-[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  9.12-[ShowViewCycle alignmentRectInsets] [Line 434]

  9.13-[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  9.14-[ShowViewCycle alignmentRectInsets] [Line 434]

10. -[ViewController updateViewConstraints] [Line 387]

  10.1 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  10.2 -[ShowViewCycle alignmentRectInsets] [Line 434]

11. -[ViewController viewDidLayoutSubviews] [Line 196]

  11.1 -[ShowViewCycle layoutSubviews] [Line 231]

  11.2 -[ShowViewCycle drawRect:] [Line 252]

12. -[ViewController shouldAutomaticallyForwardAppearanceMethods] [Line 336]

13. -[ViewController viewDidAppear:] [Line 166]

14. -[ViewController didMoveToParentViewController:] [Line 370]

15. -[ViewController viewWillLayoutSubviews] [Line 188]

16. -[ViewController updateViewConstraints] [Line 387]

  16.1 -[ShowViewCycle translatesAutoresizingMaskIntoConstraints] [Line 393]

  16.2 -[ShowViewCycle alignmentRectInsets] [Line 434]

17. -[ViewController viewDidLayoutSubviews] [Line 196]

时间: 2024-07-30 01:23:51

ViewController启动加载过程的相关文章

AngularJS进阶(三十九)基于项目实例解析ng启动加载过程

基于项目实例解析ng启动加载过程 前言 在AngularJS项目开发过程中,自己将遇到的问题进行了整理.回过头来总结一下angular的启动过程. 下面以实际项目为例进行简要讲解. 1.载入ng库 2.等待,直到DOM树构造完毕. 3.发现ng-app,自动进入启动引导阶段. 4.根据ng-app名称找到相应的路由. 5.加载默认地址. 6.Js顺序执行,加载相应模版页 sys_tpls/home.html 7.在此,可以看到index路由中只是填充了ui-view为sys_login的div模

IOS 应用程序启动加载过程(从点击图标到界面显示)

今天帮同事解决问题的时候发现,造成程序BUG的原因是同事对程序的启动和试图的加载过程不熟悉.所以当局部代码没有问题,但是程序一运行却总不是我们想要结果的时候,我们应该想想是不是因为我们忽略了试图加载过程的原因.下面我们用一个例子来简单介绍一下启动过程中常见的几个方法.首先我们通过XIB 创建了一个试图控制器(名字叫Empty ,不要问我为为啥它叫这个名字,因为我太懒了,鼠标点快了就没去该),又创建了一个UIView的子类(MyView),并且将Empty的对象 设置为窗口的跟控制器,MyView

Linux内核启动及文件系统加载过程

上接博文<u-boot之u-boot-2009.11启动过程分析> 当u-boot开始执行bootcmd命令,就进入Linux内核启动阶段,与u-boot类似,普通Linux内核的启动过程也可以分为两个阶段,但针对压缩了的内核如uImage就要包括内核自解压过程了.本文以项目中使用的linux-2.6.37版源码为例分三个阶段来描述内核启动全过程.第一阶段为内核自解压过程,第二阶段主要工作是设置ARM处理器工作模式.使能MMU.设置一级页表等,而第三阶段则主要为C代码,包括内核初始化的全部工作

你所不知道的SQL Server数据库启动过程(用户数据库加载过程的疑难杂症)

前言 本篇主要是上一篇文章的补充篇,上一篇我们介绍了SQL Server服务启动过程所遇到的一些问题和解决方法,可点击查看,我们此篇主要介绍的是SQL Server启动过程中关于用户数据库加载的流程,并且根据加载过程中所遇到的一系列问题提供解决方案. 其实SQL Server作为微软的一款优秀RDBMS,它启动的过程中,本身所带的那些系统库发生问题的情况相对还是很少的,我们在平常使用中,出问题的大部分集中于我们自己建立的用户数据库. 而且,相对于侧重面而言,其实我们更关注的是我们自己建立的用户数

spring启动component-scan类扫描加载过程---源码分析

有朋友最近问到了 spring 加载类的过程,尤其是基于 annotation 注解的加载过程,有些时候如果由于某些系统部署的问题,加载不到,很是不解!就针对这个问题,我这篇博客说说spring启动过程,用源码来说明,这部分内容也会在书中出现,只是表达方式会稍微有些区别,我将使用spring 3.0的版本来说明(虽然版本有所区别,但是变化并不是特别大),另外,这里会从WEB中使用spring开始,中途会穿插自己通过newClassPathXmlApplicationContext 的区别和联系.

【Spring源码分析系列】启动component-scan类扫描加载过程

原文地址:http://blog.csdn.net/xieyuooo/article/details/9089441/ 在spring 3.0以上大家都一般会配置一个Servelet,如下所示: 1 <servlet> 2 <servlet-name>spring</servlet-name> 3 <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-clas

spring启动component-scan类扫描加载过程(转)

文章转自 http://www.it165.net/pro/html/201406/15205.html 有朋友最近问到了 spring 加载类的过程,尤其是基于 annotation 注解的加载过程,有些时候如果由于某些系统部署的问题,加载不到,很是不解!就针对这个问题,我这篇博客说说spring启动过程,用源码来说明,这部分内容也会在书中出现,只是表达方式会稍微有些区别,我将使用spring 3.0的版本来说明(虽然版本有所区别,但是变化并不是特别大),另外,这里会从WEB中使用spring

IOS中的生命周期及加载过程

这一节,主要讲解UIKit框架下,应用程序的生命周期,UIView的生命周期,异常处理流程及控制器的加载过程. 四大对象关系图 应用程序生命周期 对上面的流程进行说明: 1. 程序启动执行,先进入main函数: int main(int argc, char * argv[]) 2. 执行UIApplicationMain函数: return UIApplicationMain(argc, argv, nil, NSStringFromClass([HKAppDelegate class]));

看看Spring的源码——Bean加载过程

最近几天跟同事聊起Spring的一些问题,对一些地方有些疑问,趁这两天有点空,看看Spring的源码,了解下具体的实现细节.本文基于Spring 4.0.5版本. 首先Web项目使用Spring是通过在web.xml里面配置org.springframework.web.context.ContextLoaderListener初始化IOC容器的. <listener> <listener-class>org.springframework.web.context.ContextL