views:

42

answers:

1

Hi Everyone,

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....

A: 

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.title setTitle:@""];
}

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

Thanks...

deamonsarea