操作表内的 UIPickerView 下半部分不响应
我使用以下教程在 UIActionSheet
内创建了一个 UIPickerView
: 添加 UIPickerView 和操作表中的按钮 - 如何?
我注意到 UIPickerView
不会响应 UIPicker
下半部分以下的触摸。也许就位于选择栏下方,但不再位于下方。
有没有人有类似经历并解决的?
I created a UIPickerView
inside an UIActionSheet
, using the following tutorial:
Add UIPickerView & a Button in Action sheet - How?
I've noticed that the UIPickerView
does not respond to touches below the bottom half of the UIPicker
. Perhaps just below the selection bar, but not any more below.
Has anyone had any similar experiences and resolved them?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我最近遇到了类似的问题,我提出了 3 个选项和一个取消。下面的 3 个按钮似乎有半个按钮未对齐。我必须在按钮之间单击才能让它们运行。这完全取决于我从哪里提交行动表。如果你有一个 TabBarController,你应该从那里呈现操作表:
如果你只有视图本身,也许还有一个导航栏,那么从视图中呈现它就可以了:
在我的例子中,我有一个用于 iphone 的选项卡栏,而不是用于 iphone 的选项卡栏。 ipad 版本,所以我这样做了:
从 UIActionSheet 参考文档中尚不清楚,但从“最前面”的最合理的控制器中呈现操作表可能是明智的。因此,如果底部有一个工具栏,则从那里显示它。这些限制似乎不适用于 iPad,因为操作表显示在弹出窗口内。
希望有帮助。
I had a similar problem recently where I was presenting 3 options and a cancel. The lower 3 buttons seemed about half a button out of alignment. I had to click inbetween the buttons to get them to operate. It all depended on where I was presenting the action sheet from. If you have a TabBarController you should present the action sheet from there:
If you just have the view itself, with perhaps a navbar then presenting it from the view is fine:
In my case I had a tab bar for the iphone and not for the ipad version so I did this:
It's not clear from the UIActionSheet reference documentation but it might be wise to present the action sheet from the 'front' most controller that is sensible. So if there is a toolbar at the bottom present it from that. These restrictions do not appear to apply to the iPad as action sheets are presented inside popovers.
Hope that helps.
嘿,转到 XIB 并尝试选择 UIPickerView,然后转到“布局”菜单和“置于前面”希望这会有所帮助!
Hey go to XIB and try selecting the UIPickerView and Then Go to "Layout" Menu and "Bring To Front" Hope this helps!!