Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS 7 backBarButtonItem hidden

I've an issue with back bar button. It stay hidden no matter that i do like self.navigationItem.hidesBackButton

Here is my code to add back button:

//
    - (void)viewDidLoad{

    [.....];

    UIBarButtonItem *back = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"UI_BTN_BACK", nil) style:UIBarButtonItemStylePlain target:nil action:nil];
    back.tintColor = [Templates getColor:@"color"];
    [[self navigationItem] setBackBarButtonItem:back];

    // Parent
    [super viewDidLoad];
}

Button stay hidden BUT going back works if if touch on the place where it should be. Of course it works on iOS6. Another detail: back button seems to appear when i set UINavigationBar translucent to YES.

Thanks

like image 899
ApheX Avatar asked Sep 23 '13 09:09

ApheX


3 Answers

[self.navigationItem setHidesBackButton:YES];

Check out this.

like image 131
Jitendra Avatar answered Nov 18 '22 17:11

Jitendra


self.navigationController.navigationBar.tintColor = [UIColor whiteColor];
like image 2
Warif Akhand Rishi Avatar answered Nov 18 '22 15:11

Warif Akhand Rishi


Use this code:

self.navigationItem.backBarButtonItem = nil;

OR

self.navigationItem.leftBarButtonItem = nil;
like image 1
P.J.Radadiya Avatar answered Nov 18 '22 17:11

P.J.Radadiya