如何停靠操作表
我有一个 actionsheet
,其中包含一个 pickerView
,后面有一个表格视图 但是当我滚动表格视图时,孔选择器也会随之滚动。 我的问题是如何“停靠”我的 pickerview
并使其始终显示在屏幕底部。
多谢
I have an actionsheet
which contains a pickerView
and I have a table view behind
but when I scroll the table view the hole picker is scrolled with it.
My question is how to "dock" my pickerview
and make it appear always at the bottom of the screen.
thanks a lot
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来您没有正确放置操作表。您根本不希望它“从屏幕上”加载,而是仅在需要时才调用和关闭。一个简单的解决方案是在呈现 actionSheet 时暂停 UI。我使用 Github 上的一个名为 EAActionSheetPicker 的库来处理这个问题。它会简化您的代码,因为您所要做的就是调用:
It sounds like you're not placing your actionSheet properly. You don't want it to be loaded 'off the screen' at all, but called and dismissed only when it's needed. A simple solution would be to pause the UI while the actionSheet is presented. I use a library on Github to handle this for me called EAActionSheetPicker. It would simplify your code 'cause all you'd have to do is call: