Questions tagged [rightbarbuttonitem]

The rightmost Bar Button Item in UIToolBar in objective-C

112 questions
3
votes
4 answers

"self.navigationItem.rightBarButtonItem" Not working

I have the following code taken straight from the NavBar sample code from Apple. I put this in the viewDidLoad method for a view in my app that is being presented modally, and it wont work. UIBarButtonItem *addButton = [[[UIBarButtonItem alloc]…
tarheel
  • 4,727
  • 9
  • 39
  • 52
3
votes
4 answers

How to fit an image in rightbarbuttonitem

I've been trying to put a hamburger button (the three parallel lines) to the right of the titleView in the nav bar, but every time I do, the image I put in covers the entire nav bar and gets rid of the image I have in titleView. If I select a…
DarthOrd
  • 61
  • 1
  • 4
3
votes
1 answer

iOS 11 UISearchBar: left + rightbarbuttonitem vertical center issue

With IOS 11, I've encountered another one issue in UISearchController. As default height value became 56 rightBarButtonItem and leftBarButtonItem are staying in their old places, regardless of whether it's text or image. I need to centre items to…
3
votes
3 answers

RightBarButtonItem shows only as inactive

I have a strange problem when trying to display a refresh button as the rightBarButtonItem. In short, I have implemented it, but couldn't see anything when running the app. However when I click on the storyboard Debug --> View Debugging --> Capture…
Houman
  • 64,245
  • 87
  • 278
  • 460
3
votes
1 answer

disable bar button text color changes to white?

Given below is image of my navigation bar, where right bar button is disable now. but when i disable it its text changes to white color. i don't want white color. Any solution of this. First image when Edit button is enabled. Other when Edit button…
Gagan Joshi
  • 3,347
  • 2
  • 21
  • 32
3
votes
1 answer

Add button to the right of uisearch bar located at navigationItem's titleView

I've a UISearchBar in navigationItem's titleView: self.searchBar = .... self.navigationItem.titleView = self.searchBar; And I need to add a button just right the UISearchbar and to be hidden when the search bar gain focus. (i.e. when the cancel…
Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219
2
votes
2 answers

Can't add a rightBarButtonItem to a UIViewController

I have the next code: - (id) initWith...{ if (self == [super initWithNibName:@"EmptyViewController" bundle:[NSBundle mainBundle]]){ ... back_btn = [[UIBarButtonItem alloc] initWithTitle:@"Back" …
2
votes
0 answers

large navigation bar with right bar button issue

i am setting large title to navigation bar and then on right side i am adding two buttons but button not set to the center with large title my code is as below Code navigationController?.navigationBar.prefersLargeTitles = true title = "Record" let…
Hussy
  • 23
  • 5
2
votes
1 answer

Wix React-Native-Navigation: onPress for custom component button

I have written a custom right navigation button by following the example given here. However, it seems like the onNavigatorEvent() method does not get called anymore when using a custom component. I even tried passing the onPress event as a prop to…
2
votes
1 answer

How do I incorporate an add text box to the navigationItem -> rightBarButtonItem?

I want to incorporate an add text box to my rightBarButtonItem so that the user is prompted for a title name when clicking on the rightBarButtonItem. This is for the TableViewController class in order to add new cell names. So far all my code does…
Aaron Mednick
  • 530
  • 2
  • 8
  • 17
2
votes
2 answers

how to Change the name of bar button dynamically

Can anyone please let me know how to convert the bar button item named as "save" to "update" in view controller while updating the data in table view controller. I am using ios 9, xcode 7.3 and swift 2.2. I am providing the sample code for the bar…
Guru Teja
  • 127
  • 2
  • 13
2
votes
1 answer

rightBarButtonItem not changing color when its disabled in iOS8

disabling the rightBarButtonItem in iOS8 is not changing its color to grey like in iOS7.Do I have to do anything more to change its color when disabled, other than changing text color color manually.
CyberInfo
  • 240
  • 2
  • 9
2
votes
1 answer

Remove only one RightBarButtonItem

In navigation bar I'm adding two right barButtonItems: [self.navigationItem setRightBarButtonItems:@[firstBarButton,secondBarButton]]; Now when I click over firstBarButtonItem want to remove it. I know when I have only one UIBarButtonItem I…
luca
  • 36,606
  • 27
  • 86
  • 125
2
votes
1 answer

want to add UInavigationBar rightBarButton like 'Now Playing' button of ipod, which doesnot disappears between view Transitions

i am new to iphone dev, i want to add a button (sign out) which remains fixed on the navigation bar's right side for every view.i.e. even when tabs of TabBar are tapped, the Sign Out button should remain fixed. Any help/suggestions would be…
Nishit
  • 591
  • 1
  • 6
  • 17
2
votes
0 answers

navigation bar title not resizing

I have my navigation bar title as a label that I am trying to resize the font. I have the right bar button set up as an array of two buttons. Instead of resizing the title just knocks off one of the right buttons. here is my code -…
user1114881
  • 731
  • 1
  • 12
  • 25