uitoolbar

Unable to simultaneously satisfy constraints with keyboard and UIToolBar

不问归期 提交于 2021-01-24 07:52:26
问题 I've table view below which I've text view. I'm adding a tool bar above keyboard to show Done button. When I tap on a button in a row to delete the row it shows LayoutConstraints issue as shown below. Following log also shows the flow of event. I can confirm that this issue is related with tool bar, if I remove tool bar then this problem doesn't appear. Similar issue is discussed on https://github.com/hackiftekhar/IQKeyboardManager/issues/1616 I've tried few suggestions from there viz.

Unable to simultaneously satisfy constraints with keyboard and UIToolBar

做~自己de王妃 提交于 2021-01-24 07:52:05
问题 I've table view below which I've text view. I'm adding a tool bar above keyboard to show Done button. When I tap on a button in a row to delete the row it shows LayoutConstraints issue as shown below. Following log also shows the flow of event. I can confirm that this issue is related with tool bar, if I remove tool bar then this problem doesn't appear. Similar issue is discussed on https://github.com/hackiftekhar/IQKeyboardManager/issues/1616 I've tried few suggestions from there viz.

How to determine position of UIBarButtonItem in UIToolbar?

夙愿已清 提交于 2020-07-04 07:55:08
问题 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 way to get the position of the damn UIBarButtonItem isn't there? 回答1: I used this which seems to be the most elegant way - (CGRect)frameForBarButtonItem:(UIBarButtonItem *)buttonItem { UIView *view = [buttonItem valueForKey:@"view"]; return view ? view

How to determine position of UIBarButtonItem in UIToolbar?

帅比萌擦擦* 提交于 2020-07-04 07:53:09
问题 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 way to get the position of the damn UIBarButtonItem isn't there? 回答1: I used this which seems to be the most elegant way - (CGRect)frameForBarButtonItem:(UIBarButtonItem *)buttonItem { UIView *view = [buttonItem valueForKey:@"view"]; return view ? view

UIToolbar with UIBarButtonItem LayoutConstraint issue

怎甘沉沦 提交于 2020-06-10 12:52:29
问题 I'm creating a UIToolbar with UIBarButtonItem in it programatically. I'm not using .xib or storyboard for this ViewController. Here's the code of how I created it. NSMutableArray *items = [[NSMutableArray alloc] init]; UIBarButtonItem *buttonItem; buttonItem = [[UIBarButtonItem alloc ] initWithTitle: [Language get:@"Home" alter:nil] style: UIBarButtonItemStyleBordered target: self action: @selector(viewChangeTo)]; [items addObject:buttonItem]; toolbar = [[UIToolbar alloc] init]; toolbar.frame

UIToolbar not transparent on iPad2

烂漫一生 提交于 2020-01-25 11:56:09
问题 This has been driving me nuts. I have a toolbar on my iPAD application and its translucent property is set to 'YES'. I am doing this in my storyboard: When I run on an iPad Air things look good. However if I run on an iPad 2 the toolbar is not translucent. I experience the same problem in the simulator and on an actual device. This is also not a problem across different versions of the OS. IE no matter what OS I run (iOS 7 or iOS 8) its wrong on an iPad 2 but correct on an iPad Air. Why????

iPhone: How to remove glow (light) from UIBarButtonItem when pressed?

醉酒当歌 提交于 2020-01-23 18:48:06
问题 I'm trying to remove the glow from a UIBarButton item so that my text appears to be a label instead of a button. I've seen various posts talking about how to do this through interface builder or by setting a boolean variable "showsTouchWhenHighlighted", but neither of these options are available to me it appears. I've tried setting the showsTouchWhenHighlighted in the .m viewDidLoad where I change the font and font-size but the UIBarButtonItem doesn't appear to have that property. I also only

iPhone: How to remove glow (light) from UIBarButtonItem when pressed?

纵然是瞬间 提交于 2020-01-23 18:48:01
问题 I'm trying to remove the glow from a UIBarButton item so that my text appears to be a label instead of a button. I've seen various posts talking about how to do this through interface builder or by setting a boolean variable "showsTouchWhenHighlighted", but neither of these options are available to me it appears. I've tried setting the showsTouchWhenHighlighted in the .m viewDidLoad where I change the font and font-size but the UIBarButtonItem doesn't appear to have that property. I also only

Auto Layout iOS 11 Toolbar UIBarButtonItem with customView

夙愿已清 提交于 2020-01-23 03:11:07
问题 Recently in our project there was a problem with a UIBarButtonItem that was using a customView. Before iOS 11 we did the layout via flexible spacing items. This didn't work anymore and so nothing was displayed. Because I didn't find an answer here on SO that really solved the issue for me, I looked into it and came up with a (admittedly kind of hacky) solution I wanted to share with you. Maybe it can help you or you have some feedback. This is mixed objc and swift code, hope you don't mind.

How can I pin a UIToolbar to the bottom of the screen in a UIScrollView

和自甴很熟 提交于 2020-01-16 03:23:06
问题 I have a UIScrollView that contains a UIToolbar, but when I scroll, the toolbar scrolls as well, separating from the bottom of the screen. Is there a way to make the toolbar stick to the bottom of the screen as the scroll happens? I tried to create a view that contained both the ScrollView and the Toolbar, but when the program runs, the ScrollView is all that I can see. This problem could be due to the ScrollView being drawn on top of the toolbar, but I'm not sure. Any help in either of these