uitoolbar

UIBarButtonItem with separate portrait and landscape images - layoutSubviews not called when popping a view controller from UINavigationController

大憨熊 提交于 2019-12-10 20:08:02
问题 I want to show completely custom buttons in UINavigationController's UIToolbar, and support portrait and landscape . Currently I have implemented a RotatingButton (a UIView subclass) class, which contains one UIButton that fills the whole RotatingButton frame. A RotatingButton also contains two images, for portrait and landscape orientations, and the heights of these images differ. Then this RotatingButton gets wrapped into UIBarButtonItem as a custom view. Currently, in RotatingButton's

Why UIBarButtonItem not getting clicks in UIToolbar set as inputAccessoryView of UITextField?

六月ゝ 毕业季﹏ 提交于 2019-12-10 19:49:05
问题 UIBarItem does not respond to clicks inside UIToolbar which is setup as inputAccessoryView on a UITextField. The button does not show click animation when I try to click it, callback does not get called. My setup looks like: @interface MyViewController() @property (weak, nonatomic) IBOutlet UITextField *closeDateTextField; @property (strong, nonatomic) UIToolbar * datePickerToolbar; @end I setup toolbar with button: - (void)viewDidLoad { self.datePickerToolbar = [[UIToolbar alloc] init];

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

痞子三分冷 提交于 2019-12-10 11:32:20
问题 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. 回答1: I assume you're looking for the same thing as the keyboard in Safari (i.e. it has a small

UIToolBar on top of UITabBar?

你说的曾经没有我的故事 提交于 2019-12-10 09:26:49
问题 When in the Camera Roll section of the Photos app, you can click the top right button to edit the photos. This replaces the bottom tab bar with three new buttons which are in a UIToolBar. I would like to do something similar, but I cannot get my UIToolBar to be on TOP of the tab bar. Is there a way to specify the layer order? Or do I need to do something different? 回答1: You may be able to add the toolbar as a subview of your key window: [[[UIApplication sharedApplication] keyWindow]

Changing the height of UIToolbar in iOS 7

梦想与她 提交于 2019-12-10 02:35:01
问题 I am trying to change the height of my UIToolbar in a new iOS 7 project but I am not able to. I am using a UINavigationController to manage a couple of UIViewController. I tried setting the frame for the toolbar via the navigation controller but alas, the toolbar property is read-only. I looked at "Is there a way to change the height of a UIToolbar?" but that did not work. I tried subclassing UIToolbar, forcing a custom height and setting the right class in the Storyboard but that did not

how can I add attached drop shadows to uinavigationbar and uitoolbar

心不动则不痛 提交于 2019-12-09 04:15:27
问题 I'm working on an app that uses a custom image for UINavigationBar and UIToolbar, which is fine, but they also need a drop shadow below the nav bar and above the toolbar, which would always rest above all other view controllers. I cannot simply make background images which include the shadows as this would not work well with my tableviews. I also need the shadows animate away when I set nav bar and tool bar to hidden (animated). I've looked through Stack Overflow and other sources on the net,

UISegmentedControl Within UIToolBar

久未见 提交于 2019-12-08 19:45:52
问题 I know how to add a UISegmentedControl to a UIToolBar from within IB, but I am trying to do the same programmatically, because I am using a custom subclass of UISegmentedControl with doesn't have an XIB. This is the code for the UISegmentedControl : SVSegmentedControl *navSC = [[SVSegmentedControl alloc] initWithSectionTitles:[NSArray arrayWithObjects:@"List", @"Calendar", nil]]; navSC.delegate = self; [self.view addSubview:navSC]; [navSC release]; navSC.center = CGPointMake(160, 70); I was

Moving UIToolBar

我是研究僧i 提交于 2019-12-08 04:18:12
问题 Is it possible to move a UIToolBar? The following code doesn't work CGRect toolbarFrame = self.tryToolbar.frame; toolbarFrame.origin.y = 10; self.tryToolbar.frame = toolbarFrame; but I've read examples of animations involving toolbars, so I guess it would work. Thanks 回答1: A better way of moving objects is using CGRectMake. Here is an example of moving a toolbar, it will also animate its motion. [UIView beginAnimations: @"moveField"context: nil]; [UIView setAnimationDelegate: self]; [UIView

Can set background image for UIBarButtonItem in nav bar, but not bottom toolbar

梦想的初衷 提交于 2019-12-08 03:23:47
问题 So this works when adding the item to the nav bar, but when i add it to the toolbar set in the bottom bar via interface builder, the background image doesn't show up. UIBarButtonItem *resetButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"Reset" style:UIBarButtonItemStylePlain target:self action:@selector(resetCriteria:)]; UIImage *img = [UIImage imageNamed:@"someImage.png"]; img = [img stretchableImageWithLeftCapWidth:5 topCapHeight:20]; [resetButtonItem setBackgroundImage:img forState

iOS - Changing UIBarButtonItem's height

非 Y 不嫁゛ 提交于 2019-12-08 02:39:52
问题 UIToolbar has a nice option for resizing (self.navigationController.toolbar.frame) I'm wondering if anyone knows of a way to change the height of a UIBarButtonItem? I have a custom toolbar with a height of 117 pixels and so far I haven't found a way of modifying the buttons on the toolbar. Also I need it to be a toolbar because the displayed view gets covered with another animated view (cut scene style) while I setup assets in the first view and the toolbar needs to stay on top during all of