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
0
votes
1 answer

Subclassing UIToolbar and overriding drawRect: - UIBarButtonItems NOT displaying

Context I'm using the 'initWithNavigationBarClass' method to initialize a UINavigationController with a custom toolbar, here is the line where I alloc init the UINavigationController navigationController = [[UINavigationController alloc]…
drc
  • 1,905
  • 4
  • 22
  • 28
0
votes
1 answer

When subclassing UIToolBar to have a custom background the bottom half of toolbar is black?

I'm subclassing UIToolBar, here is how I override the drawRect method of UIToolBar: - (void)drawRect:(CGRect)rect { UIImage *backgroundImage = [UIImage imageNamed:@"UIToolBar_Background.png"]; [backgroundImage drawInRect:CGRectMake(0, 0,…
drc
  • 1,905
  • 4
  • 22
  • 28
0
votes
1 answer

Raising the icons on UIToolbar

UIToolbars normally center their icons vertically. I want to make their icons to be partially outside the bar. See the picture: Is it possible to have control over the buttons Y position, overriding the UIToolbar default positioning? Thanks.
Duck
  • 34,902
  • 47
  • 248
  • 470
0
votes
1 answer

UIBarButtonItem Appearance for NavigationControl affecting Toolbar

I set a UIAppearance for a UIBarButtonItem in a UINavigationController like this: [[UIBarButtonItem appearanceWhenContainedIn: [UINavigationController class],nil] setBackgroundImage:bimg forState:UIControlStateNormal…
roocell
  • 2,429
  • 25
  • 28
0
votes
1 answer

UIToolbar - Allow interaction below toolbar

I have a custom UIToolbar in my UINavigationController, with a custom background image. The image is half transparent on the right. The problem that I'm having is that some views have buttons on the bottom right and the bottom part of those buttons…
Joris Timmerman
  • 1,482
  • 14
  • 25
0
votes
2 answers

a additional BarButtonItem

I just got a little problem. I found this code: MKUserTrackingBarButtonItem *trackingButton = [[MKUserTrackingBarButtonItem alloc]initWithMapView:self.mapView]; [self.mapToolbar setItems: [NSArray arrayWithObject:trackingButton] animated:YES]; and…
CTSchmidt
  • 1,155
  • 3
  • 17
  • 30
0
votes
2 answers

How to change width of an item in a UIToolbar when orientation is changed?

Using xCode 4.6, I have a toolbar at the top of my view that contains 2 buttons, followed by a text field and two more buttons after that. I have set the buttons to be equal size and I can drag the width of the text field so that the full width of…
Patrick Keane
  • 663
  • 3
  • 19
  • 41
0
votes
1 answer

How to split a UIBarButtonItem?

I have a UIToolbar with two UIBarButtonItems ("previous" and "next"), which I use as an inputAccessoryView for my UITextFields. These buttons cycle through the text fields. I have seen in some places that the buttons are actually a single split…
Macro206
  • 2,143
  • 3
  • 19
  • 25
0
votes
1 answer

Resize the View inside a UIViewController

I have a UIViewController in a Storyboard app. The Navigation bar is automatically added when a segue is set and I've added a UIToolBar from the IB to the bottom. At runtime a UIScrollView is added to the view controller as the view. The problem…
Isuru
  • 30,617
  • 60
  • 187
  • 303
0
votes
1 answer

UIBarButton Background Image Display Issue

I added a UIToolBar to a UIViewController and added UIBarButton in it, and also added code for display image in background but image is not displayed here is my code UIBarButtonItem *b1=[[UIBarButtonItem alloc]initWithTitle:@" Home "…
0
votes
2 answers

ToolBar back button is not working

Iam doing one project using storyboard ,in one viewcontroller i have a button.When i clicked that it will move to next viewcontroller but its a separate xib file. Now i tried to add aback button to that xib file So i can move back to my storyboard…
Naveen
  • 1,251
  • 9
  • 20
  • 38
0
votes
4 answers

[UIBarItem setTitle:]: unrecognized selector sent to instance

I'm trying to give my UIToolBar a title, but when I try to add a UIBarItem with a title attribute, I get this error. My code: UIBarItem *title = [[UIBarItem alloc] init]; title.title = @"My Title"; [toolBar setItems:@[cancel, title, ok]]; I've…
zakdances
  • 22,285
  • 32
  • 102
  • 173
0
votes
1 answer

How to build a UI of two textfields in a 'panel' on iOS?

I want to build a UI with textfields. I need two textfields appear in a "panel" and I have control of that "panel" to have it display or not display. How can I make that?
Mickey Shine
  • 12,187
  • 25
  • 96
  • 148
0
votes
3 answers

Set background image for UIToolBar

I've seen a lot of people doing this: [[UIToolbar appearance] setBackgroundImage:toolBarImage forBarMetrics:UIBarMetricsDefault]; For me it doesn't work, because my App crashes and says: -[_UIAppearance setBackgroundImage:]: unrecognized selector…
user1734282
  • 388
  • 2
  • 4
  • 17
0
votes
1 answer

Trouble adding item to UIToolbar

I'm working on an app with a split view controller. The master is a subclass of a tab bar controller and is the split view controller delegate. That part seems to work fine, and it does push the correct information to the detail side -- except for…
Victor Engel
  • 2,037
  • 2
  • 25
  • 46