Questions tagged [uitoolbar]

A toolbar is a control that displays one or more buttons, called toolbar items. A toolbar momentarily highlights or does not change the appearance of an item when tapped.

A UIToolbar is a bar of buttons in an iOS app. As formally defined by Apple, it is a control that displays one or more buttons, called toolbar items. A toolbar momentarily highlights or does not change the appearance of an item when tapped. Navigation controllers can display toolbars on the bottom of their views and manage the items for their child view controllers. The UIToolbar Class Reference can be found here on Apple's developer page.

The UIToolbar is also part of an important group in the iOS user interface, along with the status bar, navigation bar, tab bar, which all have specifically defined appearances and behaviors in iOS apps.

1285 questions
18
votes
3 answers

Layout Constraint Errors with simple UIToolar for keyboard inputAccessoryView

I was getting a lot of layout constraint errors so I created a new project and simply have a UIToolbar and a UITextField to try and troubleshoot the problem. Even with a clean project, I still get strange errors even though I'm not overriding any…
Anthony
  • 720
  • 1
  • 6
  • 24
18
votes
4 answers

UIDatePicker with UIToolbar

I'm trying to implement UIToolbar on UIDatepicker to dismiss it when touching "Done" button. But when I tap on the button, the datepicker is scrolling and the action button doesn't work. Here is my code : datepicker = [[UIDatePicker alloc]…
Thlbaut
  • 649
  • 7
  • 25
17
votes
5 answers

Adding tool bar on top of the uikeyboard

I have a toolbar and i would like to place it on top of the keyboard. In the keyboardwillshow notification, i tried to add toolbar to the keyboard but no luck, i cant add Please let me know UIWindow* tempWindow = [[[UIApplication sharedApplication]…
user198725878
  • 6,266
  • 18
  • 77
  • 135
16
votes
4 answers

Custom UINavigationController UIToolbar Background Image

I have an iPhone application using UINavigationController and would like to customize the elements with custom background images. I was able to do this for the UINavigationController's UINavigationBar pretty easily using Objective-C categories as…
Chris
  • 559
  • 2
  • 5
  • 13
16
votes
10 answers

Custom UIBarButtonItems from UIButtons with custom images - is it possible to make the tap targets larger?

I'm making UIBarButtons as follows: // Create "back" UIBarButtonItem UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom]; backButton.frame = CGRectMake(0, 0, 28, 17); [backButton addTarget:self action:@selector(backButtonTapped)…
Doug Smith
  • 29,668
  • 57
  • 204
  • 388
16
votes
8 answers

How to make UIToolbar have a Clear Background?

I have a UIToolbar that has a white tint, with a bar button item, followed by some flexible space, followed by another bar button item. I would like to make the toolbar completely clear so that I can see what is under the flexible space (I don't…
Kyle Rosenbluth
  • 1,672
  • 4
  • 22
  • 38
15
votes
4 answers

UIToolbar height on device rotation

From the iOS Human Interface Guidelines, iOS UI Element Usage Guidelines On iPhone, take into account the automatic change in toolbar height that occurs on device rotation. In particular, make sure your custom toolbar icons fit well in the…
0xced
  • 25,219
  • 10
  • 103
  • 255
15
votes
4 answers

UINavigationController bar covers its uiviewcontroller's content

I have a UIViewController, MyViewController, with a UIToolbar at the top. Using interface builder the doc outline looks like this: View - subview1 - subview2 - UIToolbar - Bar Button Item1 - Bar Button Item2 - Bar Button…
15
votes
1 answer

UISegmentedControl, UIToolbar and UINavigationItem

I've create a UISegmentedControl and successfully attached it to my navigationItem.tableView. But when I try instead to attach it to a UIToolbar, it blows up. I'm sure I've seen UISegementedControls on toolbars before - but can't seem to get it…
Luther Baker
  • 7,236
  • 13
  • 46
  • 64
15
votes
4 answers

iOS 7 BarButtonItem with image and title

I'm trying to figure out how can I achieve something like this: This is a toolbar and I'd like to keep the button title text without having to create the whole image with icon AND text. How can I add the icon to the left of the UIBarButtonItem…
Fred Collins
  • 5,004
  • 14
  • 62
  • 111
14
votes
3 answers

make a UIBarButtonItem with customView behave like Flexible-Space item

I have a UIBarButtonItem that has a UITextField as its customView. The toolbar contains this item and a few buttons. As the toolbar resizes (say on a device-orientation change) I want the UITextField to grow or shrink (width) to occupy all the…
TomSwift
  • 39,369
  • 12
  • 121
  • 149
14
votes
6 answers

Hide UIToolbar UIBarButtonItems

I have a UIToolbar that I set up using IB with three buttons, left, middle and right. In some situations I would like to not display the middle button. Does anybody know of a way to hide a specific button on inside a UIToolBar? There is no hide…
jmurphy
  • 1,891
  • 3
  • 22
  • 28
14
votes
1 answer

UIToolbar items not showing

I have a UINavigationController that gets pushed a DetailsViewController. In this DetailsViewController, I want to use the toolbar that comes with every UINavigationController (atleast, since iPhone OS3.0). So, in viewDidLoad in my…
NSSec
  • 4,431
  • 1
  • 27
  • 29
13
votes
7 answers

How to determine position of UIBarButtonItem in UIToolbar?

What's the easiest way to determine the x,y location of a UIBarButtonItem in a UIToolbar? The only answer I found is in any way to know where uibarbuttonitem has been drawn. All proposed answers seem too complicated. There ought to be a simpler…
Hisham
  • 1,305
  • 2
  • 15
  • 25
13
votes
7 answers

iOS 10, UIToolbar background color does not change

I have an app that's been around since iOS 8. the way it's working is that you have a UITableView and tap on cells to produce a score, depending on the score the UItoolbar at the bottom changes color using this method : func…
Jp4Real
  • 1,982
  • 4
  • 18
  • 33
1 2
3
85 86