どちらが速いですか?
@interface ViewController : UIViewController
{
UIView *myView;
}
@end
@implementation ViewController
- (void)myInit(){
UIView *view = [[UIView alloc]init];
myView = view;
view.tag = 1;
}
- (void)viewDidLoad(){
[self myInit];
[self.view addSubview:myView];//accessing by variable
//OR
[self.view addSubView:[self.view viewWithTag:1];//accessing by tag
}
@end