uitoolbar

Need help on bar button item in xcode

有些话、适合烂在心里 提交于 2019-12-25 03:53:51
问题 I have the weirdest issue today. I always use toolbar and bar button item button and never have problem. Here is the issue: I have view and the bottom has toolbar. In the toolbar, I create two bar button items which are 'back' button and 'next' button. For some reason, when i build into simulator or iphone, those buttons are not sensitive like before. On other words, the buttons do not really work. I found out that the half part (top) of the buttons are working when you touch it or use mouse

Question mark when tapping or holding font icons

╄→гoц情女王★ 提交于 2019-12-24 23:09:49
问题 So I recently started some tinkering with my app to get it iOS 11 compatible. Thankfully most of it seems to be. However I did notice, that in my toolbar if I tap or tap and hold an icon, which is supplied by a ttf file from fontello, I get a question mark box. Example of icon: menu = [[UIBarButtonItem alloc] initWithTitle:@"\ue811" style:UIBarButtonItemStylePlain target:self action:@selector(openMenu:)]; [menu setTitleTextAttributes:@{NSFontAttributeName: [UIFont fontWithName:@"fontello"

How did I get this with Interface Builder (and is it 'legal')

旧城冷巷雨未停 提交于 2019-12-24 10:05:03
问题 So here's a weird one. I've been doing a combination of interface builder and some direct editing of the .xib file and somewhere along the line I managed to produce a button (UIBarButtonItem) on the Toolbar that actually has a label BENEATH the button. Which I quite like, if only I knew how to get it consistently. Is this a standard thing that can be done with Interface Builder via some obscure methodology? Or is there a well-defined way to do it just by editing the .xib file? Note too that

Setting UIToolbar background image with iOS5.1

半世苍凉 提交于 2019-12-24 03:28:25
问题 I used the following code to set the image "Sample" as a background color of my UIToolbar self.toolbar.layer.contents = (id)[UIImage imageNamed:@"Sample.png"].CGImage; But it seems the above one does not works with iOS5.1 and the default background color of UIToolbar appeared. I doesn't have any problem with this line in iOS4. Am I missing something? Please suggest me the reason.. Thanks 回答1: // Create resizable images UIImage *gradientImage44 = [[UIImage imageNamed:@"imageName.png"]

UIToolbar and Flexable/Fixed bar button items

好久不见. 提交于 2019-12-24 02:18:17
问题 I have a toolbar, where I want to have one UIBarButtonItem centered and have another on the very right. However when I add the button on the right, my centered button gets shifted further to the left (see attached). I can't figure out how to get this resolved without using code (I would like to use interface builder only). Any ideas? 回答1: To do this in just IB, add a fixed bar button item to the very left of the bar that's the exact same width of the 'switch camera' button, followed by a

MonoTouch Dialog add a toolbar at the bottom of the dialog

杀马特。学长 韩版系。学妹 提交于 2019-12-23 22:22:12
问题 I am trying to add a Toolbar that is anchored to the bottom of a MonoTouch Dialog. Here is an example: So as you scroll, the table's contents scroll but the toolbar at the bottom remains in view always. I know how to do this by using the interface builder, but no clue as to how to do this with Mt.D. Please please tell me it can be done! 回答1: To do this, it's probably easiest to use the DialogViewController and its View as a child of another UIViewController. Just create your public class

iOS why has moved ToolBar gap to keyboard

血红的双手。 提交于 2019-12-23 20:57:36
问题 I figured out how to move my toolbar with button and text field with the appearing keyboard: - (void) liftMainViewWhenKeybordAppears:(NSNotification*)aNotification { NSDictionary* userInfo = [aNotification userInfo]; NSTimeInterval animationDuration; UIViewAnimationCurve animationCurve; CGRect keyboardFrame; [[userInfo objectForKey:UIKeyboardAnimationCurveUserInfoKey] getValue:&animationCurve]; [[userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey] getValue:&animationDuration]; [

Set UIToolbarPosition for created UIToolbar

时间秒杀一切 提交于 2019-12-23 19:25:55
问题 I'm writing app which is aimed only for iOS5 devices, so I'm trying to maximize usage of new appearance API. I can change background of my UIToolbar with following method: [[UIToolbar appearance] setBackgroundImage:<myImage> forToolbarPosition:UIToolbarPositionAny barMetrics:UIBarMetricsDefault]; Everything works fine, but I'm looking for more customization, so I was wondering about usage of UIToolbarPosition and I run into some problems. Using InterfaceBuilder or adding UIToolbar

Is it possible to hide a UIToolbar with an animation?

*爱你&永不变心* 提交于 2019-12-23 19:08:36
问题 I know this code is available to UINavigationController only. [self.navigationController setNavigationBarHidden:YES animated:YES]; 回答1: An example using blocks. This will hide a toolbar at the top of an iPad screen. [UIView animateWithDuration:.7 animations:^(void) { CGRect toolbarFrame = self.toolbar.frame; toolbarFrame.origin.y = -44; // moves iPad Toolbar off screen self.toolbar.frame = toolbarFrame; } completion:^(BOOL finished) { self.toolbar.hidden = YES; }]; 回答2: Here is the Code:

UIPopoverController toolbar at top

守給你的承諾、 提交于 2019-12-23 10:53:09
问题 I am trying to place a UIToolbar at the top of a UIPopoverController in much the same way as Apple have done in pages and keynote with the "media", "tables", "charts" "shapes" toolbar. I've managed to place one at the bottom using the same method described as in this post but I'm unable to move it to the top. I can do it by just placing a normal UIToolbar within one of the child view controllers however the toolbar does not seem to follow the same line as the border and doesn't look as nice