Question

I want to set title for the two buttons , In imagepickercontroller I have provided my code below .please suggest me any idea or links.

  - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated 
{

  if ([settingsPopoverController isEqual:button])
  {

    UINavigationItem *ipcNavBarTopItem;


    UINavigationBar *bar = navigationController.navigationBar;
    [bar setHidden:NO];
    ipcNavBarTopItem = bar.topItem;
    ipcNavBarTopItem.title = @"Front Cover";

  }
   UINavigationItem *ipcNavBarTopItem;


 UINavigationBar *bar = navigationController.navigationBar;
[bar setHidden:NO];
ipcNavBarTopItem = bar.topItem;
ipcNavBarTopItem.title = @"Back Cover";
}
Was it helpful?

Solution

 - (void)navigationController:(UINavigationController *)navigationController     willShowViewController:(UIViewController *)viewController animated:(BOOL)animated 
 {

  if ([settingsPopoverController isEqual:button])
  {

 UINavigationItem *ipcNavBarTopItem;


UINavigationBar *bar = navigationController.navigationBar;
[bar setHidden:NO];
ipcNavBarTopItem = bar.topItem;
ipcNavBarTopItem.title = @"Front Cover";
return;

}
UINavigationItem *ipcNavBarTopItem;


UINavigationBar *bar = navigationController.navigationBar;
[bar setHidden:NO];
ipcNavBarTopItem = bar.topItem;
ipcNavBarTopItem.title = @"Back Cover";
 }
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top