0

I am pushing ViewController programmatically using this code:

 LoginInfoVC *nextScr = (LoginInfoVC *) [self.storyboard instantiateViewControllerWithIdentifier:@"LoginInfoVC"];
 [self.navigationController pushViewController:nextScr animated:YES];

And in my LoginInfoVC didLoad Method I am using this code to remove back button but its not working:

 self.navigationItem.leftBarButtonItem = nil;

I also used this code:

 self.navigationItem.leftBarButtonItem.enabled = NO;

I also followed this but it doesn't help me.

Community
  • 1
  • 1
Dalvik
  • 217
  • 1
  • 2
  • 12

1 Answers1

1

Use this

[self.navigationItem setHidesBackButton:YES animated:NO];
Burhanuddin Sunelwala
  • 5,318
  • 3
  • 25
  • 51