Questions tagged [uibuttonbaritem]

UIBarButtonItem is a button specialized for placement on a UIToolbar or UINavigationBar object. It is inherited fromits abstract superclass, UIBarItem of Apple's UIKit framework. It is available in iOS 2.0 and later.The issues related with UIBarButtonItem question can be tagged with [UIButtonBarItem].

A UIBarButtonItem is an abstract object representing a button or custom view on a UIToolbar and UINavigationItem. The UIBarButtonItem defines additional initialization methods and properties for use on toolbars and navigation bars.

From Apple official documentation:UIBarButtonItem class reference You typically use Interface Builder to create and configure bar button items

SO related Question for reference:

Related tags:

35 questions
11
votes
6 answers

How to change the text of a BarButtonItem on the NavigationBar?

I am trying to create a list of items that can be edited. Something like this: To that end, I added a NavigationBar to the top of the view, then added 2 Bar Button Items in XCode designer. I set the identifier for the button on the left to Add,…
AngryHacker
  • 59,598
  • 102
  • 325
  • 594
7
votes
2 answers

iOS 7 UIButtonBarItem image does not tint

On my nav bar, I have a couple of rightBarButtonItems that have custom icons (the icon images are white, which worked well with the basic color scheme of iOS 6). Under iOS 7, loading the images using initWithTitle (see code snippet 1) replaces the…
JMC
  • 261
  • 2
  • 6
7
votes
4 answers

UIBackButton Background Image not appearing

i'm having a problem with my UIBackbutton not appearing and i'm not sure what is causing it. This is my code for making the back button image, it is in my first ViewController : UIImage *backButtonHomeImage = [[UIImage imageNamed:@"backButtonImage"]…
Alex Trott
  • 4,576
  • 4
  • 23
  • 30
5
votes
2 answers

- Button's positioning on UIToolBar in IB -

As a fervent adept of IB, I created a UIToolBar (in IB of course) and added to it a few buttons. So far so good ... but then I tried to move each of them to the right position but IB doesn't let me do it ... Each time I try to scroll them IB moves…
gotye
  • 958
  • 2
  • 14
  • 33
4
votes
2 answers

UINavigationBar back button does not appear

I have a navigationBar, with a UIImage on it's title, like this: self.navigationItem.titleView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"top_logo.png"]]; When i select a row, the "back" button does not appear. Why? I have the exact…
Rui Lopes
  • 2,562
  • 6
  • 34
  • 49
3
votes
4 answers

UIButton style when added to navigationItem.titleView

I need to add a button to the UINavigationItem titleView (actually to the center of the UINavigation Bar. I've used the following code to accomplish so: UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect]; btn.frame = CGRectMake(0, 0,…
Muhammad Hewedy
  • 29,102
  • 44
  • 127
  • 219
3
votes
1 answer

SWReveal with a UIButton

So I wanted to add a slide menu to my app where if you tap a button, the menu slides from the left. After some research I found a guide for using SWRevealViewController to create a slide out menu, but I quickly realized that video, and pretty much…
RPatel99
  • 7,448
  • 2
  • 37
  • 45
2
votes
1 answer

Where is UIButtonTypeInfoLight?

I'm looking for the UIButtonTypeInfoLight choice in the identifier list for button bar items, and I'm not seeing it. So, two questions. Is it just missing and I'll have to create it manually, in code? I'm wondering why they would omit it. Assuming…
JMattos
  • 202
  • 1
  • 2
  • 13
2
votes
3 answers

Fix multiple button click events in iOS?

Is there any way to prevent multiple button click events. In my application i have a scenario where multiple button events are getting called when the user taps the button continuously. Even after adding a loading indicator still sometimes its…
subin272
  • 733
  • 6
  • 24
2
votes
0 answers

hard to tap buttons with xcode 9 and ios 11

I am facing a weird issue to tap UIButtons with Xcode 9 and IOS 11.2. The buttons are in a UIView and are simple call to action buttons such as submit and cancel. When I click on these buttons, the action is triggered only when I click to the left…
Ron
  • 389
  • 1
  • 4
  • 16
2
votes
2 answers

UIActivityIndicatorView inside UIButtonBarItem not working properly

I am trying to get a UIActivityIndicatorView to work inside of a UIButtonBarItem using the following code: - (void)showActivityIndicator { UIActivityIndicatorView *activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0,…
Kyle
  • 17,317
  • 32
  • 140
  • 246
1
vote
1 answer

Bold Text accessibility option hides UIButtonBarItem graphics

This is a follow-up to a question I asked last week here. The main screen of my app has two button bars. Each of the buttons has either an image or a text label. I've determined that when the user has the Bold Text Accessibility option enabled,…
Jerry Agin
  • 629
  • 1
  • 5
  • 15
1
vote
1 answer

Badge on top of right navigation button

I have a requirement where I need to show the badge number on top of the right navigation button. Something like this: How to show the badge on top of UIBarButtonItem in the navigation bar? I am still using Xcode 7.3.1, Swift 2.2.
bably
  • 1,065
  • 5
  • 17
  • 27
1
vote
1 answer

How to test BarButtonItem is connected to right IBAction?

I have seen this for a normal UIButton: NSArray *actions = [viewController.addButton actionsForTarget:viewController forControlEvent:UIControlEventTouchUpInside]; XCTAssertTrue([actions containsObject:@”addNumbers:”], @””); But now I want to do…
Bernard
  • 4,240
  • 18
  • 55
  • 88
1
vote
1 answer

How add button on NavigationBar dynamically (in runtime)? - Swift 2.0

I'm trying to add navigation bar dynamically, but something a little strange is happening. My Screen is just a UINavigation and a View with red background: And this is my Swift code: import UIKit class ViewController: UIViewController { …
James
  • 1,167
  • 1
  • 13
  • 37
1
2 3