Questions tagged [uibarbuttonitem]

UIBarButtonItem is a button specialized for placement on a UIToolbar or UINavigationBar object. It inherits basic button behavior from its abstract superclass, UIBarItem. The UIBarButtonItem defines additional initialisation methods and properties for use on toolbars and navigation bars. There are some methods for customizing Appearance. Available in iOS 2.0 and later in UIKit.

A bar button item is a button specialized for placement on a UIToolbar or UINavigationBar objects. It inherits basic button behavior from its abstract superclass, UIBarItem. The UIBarButtonItem defines additional initialization methods and properties for use on toolbars and navigation bars.

iOS includes a number of system-provided items with specific icons, but developers can create custom items as well.

Note: UIBarButtonItem is not a descendent of UIView, so many common tasks like applying animations or transforms can be more difficult than you might expect.

UIBarButtonItem Class Reference

2349 questions
0
votes
1 answer

UIBarbutton that stays on navigation bar through out the app

I am trying to create an app in which, I need navigation bar button on the right corner of app all the time. On clicking on which a stopwatch will appear. Is it possible to have such button? I mean without repeating or rewriting the code in an every…
slonkar
  • 4,055
  • 8
  • 39
  • 63
0
votes
0 answers

How can I make a highlighted UIBarButtonItem?

Just like that (sorry for the height of the image, if you know how to fix that please edit this post)
אורי orihpt
  • 2,358
  • 2
  • 16
  • 41
0
votes
1 answer

Bar button item not appearing with image

I am trying to set a profile picture as a bar button item. The picture comes from a URL using SDWebImage. When I run the app the item shows as a white box and all the other right bar button items shift left. Does anybody know what I'm doing wrong?…
David
  • 155
  • 1
  • 10
0
votes
1 answer

How to create a back button with a large left-facing arrow like the iPod app

How do I create a back button with a large left-facing arrow like in the iPod app? I'm not asking how to create a left-facing button, but how to get a left-facing arrow as the label on a button, as seen in the iPod app's now playing…
Hilton Campbell
  • 6,065
  • 3
  • 47
  • 79
0
votes
0 answers

Is it possible to access NavigationBar BarButtons when created in storyboard?

I have created in storyboard, a navigation bar with 3 left bar buttons and each bar button has its own IBOutlet variable. Is there a way to access each one and get its coordinates in the navigation bar? I am just looking for the lower left and…
sugarakis
  • 117
  • 9
0
votes
0 answers

show badge on bar button item with action

I have a bar button item on my view controller which is showing a popover view, and I have an extension to show badges on any button, I tried to show the badges on the icon but it shows me another view, and I want to show the badges on my bar button…
Jasmin_m
  • 1
  • 2
0
votes
1 answer

Setting UIBarButtonItem appearance resulted in weird behaviour with back button

let attributes = [ NSAttributedString.Key.foregroundColor: UIColor.orange, NSAttributedString.Key.font: UIFont.systemFont(ofSize: 22) ] // set nav bar button item // solution 1 - this will not…
0
votes
3 answers

UIBarButtonItem call UIActionsheet

in main view a have an navigationController on click on a row a call the detailview and add a button seminareListinView.m #import "SeminareListingView.h" #import "Seminar.h" -(void) tableView:(UITableView *)tableView…
Alexander_F
  • 2,831
  • 3
  • 28
  • 61
0
votes
2 answers

Navigate from Bar Button item to navigation controller

I have a view controller with bar button item, and an action on this button to navigate from the view to another navigation view controller, but when I navigate to the navigation controller the navigation bar is hidden! my navigation code guard let…
Jacob
  • 121
  • 1
  • 8
0
votes
1 answer

Adding Labels to buttons

I'd like to label the buttons (UIBarButtonItem) on my UIToolbar because I'm going to be using custom icons that may not be 100% obvious/intuitive without them. Having a hard time figuring out the best way to do this. Given that buttons center…
0
votes
3 answers

add UIBarButtonItem to UINavigation bar without UInavigationController

i have a tabbed application and some tabs use a navigation stack. Thats fine, But the tabs that don't, i want to add a consistant layout. So I'm wondering how to add barButtonItems to the navigation bar, without navigation stack. So this wont work…
cream-corn
  • 1,820
  • 14
  • 26
0
votes
1 answer

buttons on navigation bar not loading

i want to add buttons on navigation bar but its not loading on bar.Please help.Following is my code.please tell me where i am going wrong.The view i am using is landscape - (void)viewDidLoad { [super viewDidLoad]; CGRect rect =…
Dipti Y W
  • 474
  • 1
  • 8
  • 26
0
votes
2 answers

problem with action handler of UIBarButtonItems

I am facing a very silly problem with my code for buttons in the toolbar. I am using the following code and I already have the action handler functions in the code, but whenever I am clicking on the buttons, I am getting the error: " - [UIWebView…
Ahsan
  • 2,964
  • 11
  • 53
  • 96
0
votes
1 answer

Padding for rightbar button item?

I can add some padding to my rightbarbuttonitem(eye icon) with the following codes but the result is slightly different on other devices. You can see in the image. let add = UIBarButtonItem(image: #imageLiteral(resourceName: "open"), style:…
portable
  • 11
  • 3
0
votes
1 answer

how set images on buttons of navigation bar?

I need to put images on add,cancel and back buttons of navigation bar. I have done with add button but not getting for back button. even with this add button image it shows back blue color custom button.how to set for this? UIBarButtonItem…
Heena Dave
  • 319
  • 7
  • 21