I am trying to add navigation button to top bar in a UITabController but the button isn’t showing.
UIBarButtonItem * leftButtonItem = [[UIBarButtonItem alloc] initWithTitle: @"SETTING" style: UIBarButtonItemStyleBordered target: self action: @selector(permanentlyCloseWelcomeView)] ;
[[self navigationItem] setLeftBarButtonItem: leftButtonItem];
Is the view controller inside a UINavigationController? You only get self.navigationItem if it is. Check it in the debugger, I bet it’s nil on your second line.
You need to embed the view controller in a navigation controller, or if you just want the bar and not a nav controller, you put the bar button item on your manually-created nav bar.