uitoolbar

UIBarButtonItems not showing up on UIToolbar

▼魔方 西西 提交于 2019-12-06 08:53:22
I have a UINavigationController with toolbarHidden set to NO. I have added UIBarButtonItems to navigationController.toolbar. The toolbar is displayed, but the buttons are not... What gives? Ok so apparently I misunderstood the usage of the setItems method on navigationController. To remedy this I set the toolbar items on each view controller that is pushed onto the navigation controller's stack. I guess if I wanted to have one toolbar persist through all the views I could add a new toolbar to the view controller holding my navigation controller then simply invoke setItems on my navigation

How to add a UIToolbar on top of UIKeyboard using MonoTouch?

青春壹個敷衍的年華 提交于 2019-12-06 08:25:04
I follow the example in Obj-C at Custom iPhone Keyboard for finding the UIKeyboard in the Windows SubViews, however, I don't know how to do this using MonoTouch. I don't know what the "description" is. If it is a property of UIView I cannot access it from MonoTouch??? Can someone please provide an example of finding the UIKeyboard as in the Obj-C sample but in C# for use in MonoTouch? Thank you. I assume you're looking for the same thing as the keyboard in Safari (i.e. it has a small toolbar at the top that adds extra functionality, as seen on the far right image here ) In that case, what you

UIToolbar Resizing causes weird UIBarButtonItem size in Landscape

北慕城南 提交于 2019-12-06 07:32:44
When I create and add a UIToolBar and UIBarButton items, how can I get the toolbar and items to appear properly in both orientations. This is what I have so far: self.toolbar = [[[UIToolbar alloc]initWithFrame:CGRectMake(0, 372, 320, 44)]autorelease]; self.toolbar.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight; self.deleteButton = [[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemTrash target:self action:@selector(deleteButtonClicked)] autorelease]; self.deleteButton.style =

Color of UIToolbar not changing

时间秒杀一切 提交于 2019-12-06 02:10:31
问题 I have created a UIToolbar. I am trying to give it black color using: toolbar.barStyle = UIBarStyleBlackOpaque; or toolbar's background property. But its color does not change in either case. How can I change it? 回答1: Have you tried setting the tint property on UIToolbar? ie: - (void)viewDidLoad { [super viewDidLoad]; UIToolbar *toolbar=[[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, 320, 46)]; toolbar.tintColor=[UIColor redColor]; [self.view addSubview:toolbar]; [toolbar release]; }

iphone - How can I use an UIBarButtonItem style without the UIToolBar

非 Y 不嫁゛ 提交于 2019-12-06 00:31:23
Can I show a black style UIBarButtonItem in my view without the underneath UIToolBar? The UIToolBar always has a kind of border thing, I want the system UIBarButtonItem in black just like a black standard cancel button, but not the UIToolBar How can I do it? Thanks there is a cheeky hack that will help you with this. you want to use a UISegmentedControl with style set to UISegmentedControlStyleBar and only one item. You also need to setMomentary to yes - to make it behave like a button: UISegmentedControl *myCustomButton = [[UISegmentedControl alloc] initWithItems:[NSArray arrayWithObjects:@

How do I add a UISegmentedControl to my UIToolbar using Storyboard?

梦想与她 提交于 2019-12-05 21:28:12
I'm trying to add a Segmented Control to my UIToolbar below, but when I try to drag it over in Storyboard it replaces my Table View. Also, when I try to add UIBarButton to my Toolbar it pushes my Prototype Cells down... do I have my views hierarchy wrong? When I add a UIBarButton item anyway, in the simulator the toolbar is not Black Transparent as I set in my navigation control inspector. Whats up with that? thanks! Phillip 1 - Do it programmatically. You need to assign a frame to your UIToolbar first, then you can add elements in it (the segmentedControl). I suggest though to use

How to hide inputAccessoryView without dismissing keyboard

扶醉桌前 提交于 2019-12-05 15:14:47
问题 I am using a toolbar in the inputAccessoryView property of a textView. When the keyboard shows, it displays the toolbar as expected. When the device is rotated I want to remove the toolbar. I tried: myTextView.inputAccessoryView.hidden = !layoutIsPortrait; This does hide the toolbar, but leaves the outline of the taller keyboard behind. The keyboard is apparently still sized to fit the toolbar. It looks bad and interferes with touch events of underlying responders. myTextView

add image to UIBarButtonItem for UIToolbar

自作多情 提交于 2019-12-05 07:33:29
问题 I am trying to add an image to the UIBarButtonItem which I have to use in a UIToolbar. I have managed to read the image and even get it to display with a UIImageView, but when i add it to the UIBarButtonItem and then add that item to the UIToolbar, the toolbar just displaces a "Blank White" space the size and shape of the image that I am trying to load. here is what I am trying. UIImage *image = [UIImage imageNamed:@"6.png"]; //This is the UIImageView that I was using to display the image so

Adjust width of UITextField to fill toolbar in landscape

被刻印的时光 ゝ 提交于 2019-12-05 07:25:36
In a UIToolbar , I have added a UITextField to the middle of the bar (which gets added as a UIBarButtonItem ) with another UIBarButtonItem (Action button) next to it. I added flexible space bar button items at the very left and very right. It looks great on portrait, but when I rotate to landscape it centers them and looks ok, but I need the text field to get stretched to fill the width and push the last button clear to the right - exactly like it does in Messages - on iPhone and iPad. I thought Auto Layout would do the trick but Apple states you cannot create constraints for UIBarButtonItem s

how to set uitoolbar's background similar to my navigation bar

耗尽温柔 提交于 2019-12-05 06:49:39
Hello everyone: I have set a custom background for my navigation bar, it's a tint color i think that i chose from IB. Now i want to change the my uitoolbar's (added programmatically) background similar to my navigation bar, programmatically. Obliged for any help in this regard. Sorry guys my bad it's actually navigation controller's toolbar. so this worked for me: self.navigationController.toolbar.tintColor=self.navigationController.navigationBar.tintColor; Thanks all of u guys for quick response especially @phooze which set me in the right direction :) UIToolbar also has a tintColor property,