// Created by xue on 4/22/16.
// Copyright © 2016 Jessica. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
//通过xib/storyboard创建自定义控件会调用此方法,是从xib、storyboard里正在解析且视图全部加载完成之前的时候调用,NSCoder是Xib解析器
- (instancetype)initWithCoder:(NSCoder *)aDecoder {
NSLog(@"%s", __func__);
self = [super initWithCoder:aDecoder];
if (self) {
}
return self;
}
//也是通过xib/storyboard创建自定义控件时调用,不同的是该方法是当所有控件全部加载完成后才调用
- (void)awakeFromNib {
NSLog(@"%s", __func__);
}
- (void)viewDidLoad {
[super viewDidLoad];
NSLog(@"%s", __func__);
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end