Customize back button for UIImagePickerController?

enter image description here How to set the reverse navigation button "Photo album" to "Photo" in UIImagePickerController?

I tried my luck

Any idea how to customize the photo album navigation button back.

UIImagePickerController *albumPicker = [[UIImagePickerController alloc]init]; [albumPicker setDelegate:self]; [albumPicker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary]; popOverController = [[UIPopoverController alloc]initWithContentViewController:albumPicker]; [popOverController presentPopoverFromRect:CGRectMake(0,0,templatePhotoPlaceholderView.frame.size.height/2,templatePhotoPlaceholderView.frame.size.height) inView:templatePhotoPlaceholderView permittedArrowDirections:UIPopoverArrowDirectionAny animated:NO]; [popOverController setPopoverContentSize:CGSizeMake(320, 480)]; [albumPicker release]; 

I want to set up photo albums on the photo shown on the image and saved photos on the photo How to do this I try to keep it from working

+7
source share
3 answers
 - (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; } 

This fixes the issue for the question.

+7
source

You should be able to apply this code to the controller:

 UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithTitle:@"Photo" style:UIBarButtonItemStyleBordered target:self action:@selector(buttonPressed:)]; self.navigationItem.leftBarButtonItem = btn; // or rightBarButtonItem [btn release]; 

Where self - UIViewController - also remember that you will need to configure the action method for the selector.

Alternatively, you can access the left / right button by minimizing it as a controller button and then setting its title.

0
source

after checking all [[UIBarButtonItem appearanceWhenContainedIn:[UIImagePickerController class], nil] setBackButtonBackgroundImage:[UIImage imageNamed:@"blank-button"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; solved my problem and this discussion will help me learn about navigation in the ImagePicker class

0
source

All Articles