automaticallyAdjustsScrollViewInsets funktioniert nicht

Ich habe eine extrem einfache Demo-App erstellt, um die Funktionalität von zu testenautomaticallyAdjustsScrollViewInsets, aber die letzte Zelle der tableView wird von meiner Tab-Leiste verdeckt.

Mein AppDelegate-Code:

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

[self.window setRootViewController:tabControl];

Mein testViewController (Unterklasse von UITableViewController) Code:

- (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;
}

Ist das ein Fehler in iOS 7? Wenn nicht, was habe ich falsch gemacht?

Antworten auf die Frage(6)

Ihre Antwort auf die Frage