-1

Double navigation bar image

Guys, i'm pushing from a view, that not support segue, programmatically using the code:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
OtherUsersProfileViewController * vc=[storyboard instantiateViewControllerWithIdentifier:@"OtherUsersProfileViewController"];
vc.agent_ID = self.opponentID;
vc.agent_Name = self.title;
[self.navigationController pushViewController:vc animated:YES];

And in OtherUsersProfile im getting a double navigation bar, what can it be?

Leo
  • 24,596
  • 11
  • 71
  • 92

1 Answers1

1

As from Image You don't need to add New Navigation in storyboard.

You have to option to achieve this :

First Way: Using Default Navigation Bar

  1. Just Remove default back button and add your new Custom Navigation Button.

    Hide Back Button

    Add Custom Image in Nav Bar

Second Way : Remove Default Navigation bar and add your Custom Nav bar Via Story board.

 self.navigationController.navigationBar.hidden = YES;
 //And then your code will work fine.
Community
  • 1
  • 1
Rahul
  • 5,594
  • 7
  • 38
  • 92