如下面的屏幕截图所示,我有一个带有一些信息的 UITableView,并且在选择一行时会调用 ABUnknownPersonViewController。为了能够解除它并返回 UITableView 我有这个代码:
ABUnknownPersonViewController *unknownPersonView = [[[ABUnknownPersonViewController alloc] init] autorelease];
[unknownPersonView setUnknownPersonViewDelegate:self];
[unknownPersonView setDisplayedPerson:personRecord];
[unknownPersonView setAllowsAddingToAddressBook:YES];
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:@"Επιστροφή" style:UIBarButtonItemStylePlain
target:self action:@selector(goBackToView)];
unknownPersonView.navigationItem.title = @"Προσθήκη στις επαφές";
unknownPersonView.navigationItem.leftBarButtonItem = anotherButton;
navigationController = [[[UINavigationController alloc] initWithRootViewController:unknownPersonView] autorelease];
//navigationController = [[[UINavigationController alloc] initWithRootViewController:self] autorelease];
//self.navigationItem.rightBarButtonItem = anotherButton;
[self presentModalViewController:navigationController animated:YES];
} // didSelectRowAtIndexPath ends here
- (IBAction)goBackToView {
[self dismissModalViewControllerAnimated:YES];
}
- (void)unknownPersonViewController:(ABUnknownPersonViewController *)unknownPersonView didResolveToPerson:(ABRecordRef)person {
// CallerIDAppDelegate *delegate = (CallerIDAppDelegate *)[[UIApplication sharedApplication] delegate];
[navigationController dismissModalViewControllerAnimated:YES];
}
问题(如您所见)是当 ABUnknownPersonViewController 被“Επιστροφή”按钮(实际上是“返回”)关闭时,持有 tableView 和蓝色 UIButton 的视图被移动到底部几个像素!
关于可能导致这种情况的任何帮助?