美文网首页
iOS 生命周期详解

iOS 生命周期详解

作者: 多肉肉 | 来源:发表于2020-01-13 12:46 被阅读0次

    iOS生命周期调动系统函数过程:

    有Storyboard

    [ViewController load]

    [ViewController initWithCoder:]

    [ViewController awakeFromNib]

    [ViewController loadView]

    [ViewController viewDidLoad]

    [ViewController viewWillAppear:]

    [ViewController viewWillLayoutSubviews]

    [ViewController viewDidLayoutSubviews]

    [ViewController viewDidAppear:]

    无storyboard

    [ViewController load]

    [ViewController initWithNibName:bundle:]

    [ViewController init]

    [ViewController loadView]

    [ViewController viewDidLoad]

    [ViewController viewWillAppear:]

    [ViewController viewWillLayoutSubviews]

    [ViewController viewDidLayoutSubviews]

    [ViewController viewDidAppear:]

    举例子:AViewController push到 BViewController:

    相关文章

      网友评论

          本文标题:iOS 生命周期详解

          本文链接:https://www.haomeiwen.com/subject/iwbgactx.html