XCode UIPickerView 延迟选择
我希望 UIPIckerView 允许您滚动然后选择,但由于它不允许,有没有办法延迟自动选择?例如,如果我向下滚动并且它停在某个项目上,它会立即自动选择该项目。有没有什么方法可以让它在落在物品上时必须等待 1-2 秒才能选择?这样,用户就有更多时间继续滚动列表。
I wish the UIPIckerView would allow you to scroll then select but since it doesn't, is there a way to delay the auto select? For example, if I scroll down and it stops on an item, it instantly automatically selects that item. Is there any way to make it so that if it lands on the item, it must wait for example like 1-2 seconds before selecting? This way it gives to user more time to keep scrolling through the list.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也有同样的问题。我想了一会儿,觉得只要添加一个 NSTimer 就可以了。
这就是我所做的:
然后我添加了一个无效声明:
希望有帮助,
Seb
I had the same problem. When I thought about it for a while I thought well just add an NSTimer.
This is what I did:
and then I added a void statement:
Hope that helps,
Seb