Objective-C では、メソッドの上部または下部でスーパー ビュー オーバーライド メソッドを呼び出す必要がありますか? 違いは何ですか?
例えば:
メソッドの上部:
- (void)viewDidLoad {
// HERE
[super viewDidLoad];
//Init the table view
UITableView *aTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 100, 400)];
aTableView.delegate = self;
aTableView.dataSource = self;
aTableView.backgroundColor = [UIColor clearColor];
self.tableView = aTableView;
[aTableView release];
}
または、メソッドの下部で:
- (void)viewDidLoad {
//Init the table view
UITableView *aTableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 100, 400)];
aTableView.delegate = self;
aTableView.dataSource = self;
aTableView.backgroundColor = [UIColor clearColor];
self.tableView = aTableView;
[aTableView release];
// HERE
[super viewDidLoad];
}