Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing NavigationBar Title of UIImagePickerController

I want to know how we can change the navigation bar title of UIImagePickerController. I tried several ways but couldn't do it.

tried the follwing ways,

imgPicker.title = [NSString stringWithString:@"My Name"];
imgPicker.navigationItem.title = [NSString stringWithString:@"My Name"];

But it still gives me the default title called "Photo Albums".Can anyone please tell me how to do it?....

Thanks....

like image 249
Damitha Raveendra Avatar asked Sep 15 '10 10:09

Damitha Raveendra


Video Answer


1 Answers

I found the way to do it. When you set your UIImagePickerController delegate to self and implement the following method it worked.

- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
    [viewController.navigationItem setTitle:@""];
}

Found it from this link http://forums.macrumors.com/showthread.php?t=533216

Thanks...

like image 140
Damitha Raveendra Avatar answered Sep 24 '22 07:09

Damitha Raveendra