setself.view.tag
が loadView で 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];
}