我想在UIImagePickerController
中给出标题,如图片截图所示
答案 0 :(得分:1)
将UIImagePickerController
委托设置为self并实施UINavigationControllerDelegate
的以下方法:
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
[viewController.navigationItem setTitle:@"<Your-Title>"];
}
答案 1 :(得分:1)
您尝试此代码:
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated {
UINavigationItem *ipcNavBarTopItem;
// add done button to right side of nav bar
UIBarButtonItem *doneButton = [[UIBarButtonItem alloc] initWithTitle:@"Photos"
style:UIBarButtonItemStylePlain
target:self
action:@selector(saveImages:)];
UINavigationBar *bar = navigationController.navigationBar;
[bar setHidden:NO];
ipcNavBarTopItem = bar.topItem;
ipcNavBarTopItem.title = @"Photos";
ipcNavBarTopItem.rightBarButtonItem = doneButton;
}
答案 2 :(得分:0)
您需要在Swift中实现QAbstractListModel
的委托方法:
UINavigationController