Questions tagged [backbarbuttonitem]
80 questions
252
votes
31 answers
Change color of Back button in navigation bar
I am trying to change the color of the Settings button to white, but can't get it to change.
I've tried both of these:
navigationItem.leftBarButtonItem?.tintColor = UIColor.whiteColor()
navigationItem.backBarButtonItem?.tintColor =…

Brandon Evans
- 2,521
- 2
- 11
- 4
18
votes
10 answers
iPhone Set Tint Color of Back Bar Button Item
I am trying to set the tint color of the back button within a navigation controller, but nothing is working. I have tried
[self.navigationController.backBarButtonItem setTintColor:myColor];
//myColor was previously set
But it stays the default…

user717452
- 33
- 14
- 73
- 149
13
votes
5 answers
set title of back bar button item in ios
I am using storyboards in my application, and if I set the title property of a ViewController class, that string will appear as the text of my back button when I push a SecondViewController, how can I change this?, I want to put a different title…

CarinaM
- 527
- 4
- 12
- 27
9
votes
1 answer
backBarButtonItem gets renamed in iOS 7 when there is a long title
One behavior I observed in iOS 7 is that the title of the backBarButtonItem of a UINavigationItem get's renamed if the title of the currently displayed view controller is too long. Too lazy to explain so here are some photos:
As you can see, when…

spybart
- 2,583
- 3
- 22
- 33
8
votes
2 answers
Back swipe gesture is not work when I add the leftBarButtonItem
Here is a ViewControllerA push a ViewControllerB, and in the ViewControllerB the leftBarButtonItem is set as following:
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain…

lu yuan
- 7,207
- 9
- 44
- 78
7
votes
1 answer
Left Bar Button Item - show name of previous View Controller
If you have a Navigation Controller with no Bar Button Items, a navigation back button will be shown with the name of the last View Controller.
I want to keep that name, as in I don't want to have to hardcode it. I do know how to add it in but I…

Mikael Weiss
- 839
- 2
- 14
- 25
7
votes
4 answers
Customizing the BackBarButtonItem
I'm trying to customize the backBarButtonItem with a custom image (the text 'back' is included in that image), here is the current result:
https://i.stack.imgur.com/jn9u4.png
Does anyone know why this might be happening?
Here is my code on…

Dom Chapman
- 953
- 2
- 10
- 15
6
votes
1 answer
How to change shortened back button title?
So as we know UINavigationController automatically presents Back button if new view controller was pushed to navigation controller's stack. If title was not set in previous view controller, back button shows default "Back" title. If I set title in…

Andrius
- 2,247
- 3
- 14
- 15
5
votes
4 answers
How to change the title of the "back" bar button item?
I want to change the "Root View Controller" back button to "Back" without changing the title of the Root View Controller.
I have tried these 3 code but all of them do not work.
navigationItem.backBarButtonItem?.title =…

Swift Everyday
- 271
- 1
- 5
- 13
4
votes
5 answers
iOS - How to make a backBarButtonItem also execute a custom function?
I am an iOS development newbie. I am using the following code to set my backBarButtonItem -
UIBarButtonItem *temporaryBarButtonItem=[[UIBarButtonItem alloc] init];
temporaryBarButtonItem.title=@"Back";
self.navigationItem.backBarButtonItem =…

Suchi
- 9,989
- 23
- 68
- 112
4
votes
4 answers
how to change the color of backBarButtonItem?
In my application I want to change the color of bacBarButtonItem.
Is it possible to change the color? or I have to put an image of it.
and in case of image tell me the code how to put the image.

iPhone
- 4,092
- 3
- 34
- 58
4
votes
4 answers
How to make leftBarButtonItem looking like backBarButtonItem?
The default solvings are not appropriate:
to change the previous ViewController title - I need to make my own function controlling the button touches up
to make a leftBarButtonItem and hide backBarButtonItem - leftBarButtonItem doesn't look like a…

Gargo
- 1,135
- 1
- 10
- 21
4
votes
3 answers
how to set action backBarButtonItem in swift?
How to to set action backBarButtonItem and still display left arrow?
I used this code but the arrow was not display
var barBack = UIBarButtonItem(title: "Reset", style: UIBarButtonItemStyle.Plain, target: self, action:…

Aditya Dharma
- 708
- 2
- 8
- 22
3
votes
0 answers
implement backBarButtonItem to send message to delegate before
inside a NavigationController I want to re-implement the back button in a second level content tableview controller to call an additional method before it pops back to the first level content tableview controller. In this method I want to send a…

Tobe
- 508
- 5
- 14
3
votes
1 answer
iOS navigationbar setBackBarButtonItem to custom button
I need some assistance with how to customize 'backBarButtonItem'
And no I dont want to use the LeftBarButtomItem since I want to inherit the style and keep the transition from the 'BackBarButtom'
Okey, so what I got is:
UIBarButtonItem* barbtnItem =…

Pedroinpeace
- 1,419
- 1
- 14
- 20