#import"CZViewController.h"
@interfaceCZViewController()
@end
@implementationCZViewController
/**
如果使用Storyboard,init,initWithNibName都不会被调用
*/
- (instancetype)init
{
self= [superinit];
if(self) {
NSLog(@"%s", __func__);
}
returnself;
}
- (id)initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil
{
self= [superinit];
if(self) {
NSLog(@"%s", __func__);
}
returnself;
}
//网络:二进制数据流,字符流
// 4G 100b(it)ps 600M (Byte 1 Byte = 8 Bit 8 Bytes 256) 6s
//使用解码器对对象解码:将二进制数据/文本文件(XML)转换成对象
// StoryBoard | XIB会调用此方法!
//调用此方法时,界面元素还没有完全到位
- (id)initWithCoder:(NSCoder*)aDecoder
{
self= [superinitWithCoder:aDecoder];
if(self) {
NSLog(@"%s", __func__);
}
returnself;
}
//解码完成,各个控件基本到位
- (void)awakeFromNib
{
NSLog(@"%s", __func__);
}
- (void)viewDidLoad
{
[superviewDidLoad];
NSLog(@"%s", __func__);
}
- (void)viewWillAppear:(BOOL)animated
{
[superviewWillAppear:animated];
NSLog(@"%s", __func__);
}
- (void)didReceiveMemoryWarning
{
[superdidReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}