美文网首页
UIViewController的-init方法和- (inst

UIViewController的-init方法和- (inst

作者: afb399d1a25f | 来源:发表于2016-08-03 20:49 被阅读146次

HomePageViewController *homePageViewController = [[HomePageViewController alloc] init];

视图控制器对象的-init方法的内部会自动调用-initWithNibName: bundle:方法

  • (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {

    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];

    if (self) {

      [self requestContentForHomePageAtIndex:0];
    

    }

    return self;
    }

相关文章

网友评论

      本文标题:UIViewController的-init方法和- (inst

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