zoukankan      html  css  js  c++  java
  • UIViewController函数调用顺序

    /*********** 0 执行1次而已 ******************/
    + (void)load {
        NSLog(@" 0:%s", __func__);
    }
     
    /*********** 1 执行1次而已 ******************/
    + (void)initialize {
        NSLog(@" 1:%s", __func__);
    }
    
    /*********** 常规的对象函数 ******************/
    /// 2
    - (instancetype)init {
        self = [super init];
        if (self) {
            NSLog(@" 2:%s", __func__);
        }
        return self;
    }
     
    /// 3
    - (void)loadView {
        [super loadView];
        NSLog(@" 3:%s", __func__);
    }
     
    /// 4
    - (void)viewDidLoad {
        [super viewDidLoad];
        NSLog(@" 4:%s", __func__);
    }
     
    /// 5
    - (void)viewWillAppear:(BOOL)animated {
        [super viewWillAppear:animated];
        NSLog(@" 5:%s", __func__);
    }
     
    /// 6
    - (void)updateViewConstraints {
        [super updateViewConstraints];
        NSLog(@" 6:%s", __func__);
    }
     
    /// 7
    - (void)viewWillLayoutSubviews {
        [super viewWillLayoutSubviews];
        NSLog(@" 7:%s", __func__);
    }
     
    /// 8
    - (void)viewDidLayoutSubviews {
        [super viewDidLayoutSubviews];
        NSLog(@" 8:%s", __func__);
    }
     
    /// 9
    - (void)viewDidAppear:(BOOL)animated {
        [super viewDidAppear:animated];
        NSLog(@" 9:%s", __func__);
    }
     
    /// 10
    - (void)viewWillDisappear:(BOOL)animated {
        [super viewWillDisappear:animated];
        NSLog(@"10:%s", __func__);
    }
     
    /// 11
    - (void)viewDidDisappear:(BOOL)animated {
        [super viewDidDisappear:animated];
        NSLog(@"11:%s", __func__);
    }
    
  • 相关阅读:
    About me
    新blog!!!
    卡常技巧
    考试策略
    Bzoj 1260: [CQOI2007]涂色paint (区间DP)
    Bzoj 1081 [Ahoi2009] chess 中国象棋
    NOIP2018 全国热身赛 第二场 (不开放)
    AT2386 Colorful Hats (乱搞题,思维题)
    模拟赛2
    CF873B Balanced Substring (前缀和)
  • 原文地址:https://www.cnblogs.com/CH520/p/9551143.html
Copyright © 2011-2022 走看看