当导航控制器出现在 UIPopoverController 中时,我的 UIBarButtonItem 在导航栏中被切断。知道是什么原因造成的吗?
问题截图: http: //www.flickr.com/photos/92771610@N02/8432176079
这是代码:
UIViewController *vc = [[[UIViewController alloc] init] autorelease];
UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(saveAction:)];
vc.navigationItem.rightBarButtonItem = saveButton;
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:vc] autorelease];
UIPopoverController *popoverController = [[UIPopoverController alloc] initWithContentViewController:navController];
popoverController.delegate = self;
[popoverController presentPopoverFromRect:buttonThatMakesThePopoverAppear.frame
inView:self.view.superview
permittedArrowDirections:UIPopoverArrowDirectionAny
animated:YES];
谢谢,贡萨洛