Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customize back button for UIImagePickerController?

enter image description hereHow to customize "Photo Album" back navigation button to "Photo" in UIImagePickerController?

I have try my luck

Any idea how to customize the Photo Album back navigation button.

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 customize the photo albums to Photo has shown in image and Saved Photos to Photo's How to do this I try it its not working for me

like image 597
user891268 Avatar asked Sep 20 '11 10:09

user891268


1 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 is fixed the problem for the question.

like image 78
user891268 Avatar answered Oct 24 '22 09:10

user891268