当在 loadView 中设置self.view.tag
为 10,但在viewDidload
它的标签中为 0 为什么?谢谢
- (void)loadView
{
[super loadView];
NSLog(@"loadView %d",self.view.tag);
[self.view setTag:10];
self.view = [[UIView alloc] initWithFrame:self.view.frame];
self.view.backgroundColor = [UIColor yellowColor];
}
#pragma mark view loaded
- (void)viewDidLoad
{
[super viewDidLoad];
NSLog(@"ViewDidload %d",self.view.tag);
[self.view setTag:10];
}