automaticAdjustsScrollViewInsets nie działa

Stworzyłem niezwykle prostą aplikację demonstracyjną do testowania funkcjonalnościautomaticallyAdjustsScrollViewInsets, ale ostatnia komórka tableView jest pokryta moim paskiem kart.

Mój kod AppDelegate:

UITabBarController *tabControl = [[UITabBarController alloc] init];
tabControl.tabBar.translucent = YES;
testViewController *test = [[testViewController alloc] init];
[tabControl setViewControllers:@[test]];

[self.window setRootViewController:tabControl];

Mój testViewController (podklasa UITableViewController) Kod:

- (void)viewDidLoad
{
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = YES;
self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds];
self.tableView.dataSource = self;
self.tableView.scrollIndicatorInsets = self.tableView.contentInset;
//[self.view addSubview:self.tableView];

// Do any additional setup after loading the view.
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 20;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@""];
cell.textLabel.text = @"test";
return cell;
}

Czy to błąd w iOS 7? Jeśli nie, co zrobiłem źle?

questionAnswers(6)

yourAnswerToTheQuestion