如何更改图像选择器模式视图中的“选择”按钮名称和功能?
我想将名称更改为“上传”按钮,以将电影上传到网络。
将此方法用作:
-(void)saveImages:(id)sender
{
}
- (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:@"Custom Title"
style:UIBarButtonItemStylePlain
target:self
action:@selector(saveImages:)];
UINavigationBar *bar = navigationController.navigationBar;
[bar setHidden:NO];
ipcNavBarTopItem = bar.topItem;
ipcNavBarTopItem.title = @"any Title";
ipcNavBarTopItem.rightBarButtonItem = doneButton;
}