文档描述不够详细,有人测试结果如下: init does not cause layoutSubviews to be called (duh) addSubview causes layoutSubviews to be called on the view being added, the view it’s being added to (target view), and all the subviews of the target view setFrame intelligently…
- (void)viewDidLoad; // Called after the view has been loaded. For view controllers created in code, this is after -loadView. For view controllers unarchived from a nib, this is after the view is set. 官网写的很清楚 1.View被加载的时候 2.View controllers用代码创建的时候 3…