我可以以编程方式滚动到UIPickerView中的所需行吗? [英] Can I programmatically scroll to a desired row in UIPickerView?

查看:76
本文介绍了我可以以编程方式滚动到UIPickerView中的所需行吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

默认情况下,初始化UIPickerView后会突出显示第一行。如何突出显示特定行或以编程方式滚动到特定行?

By default the first row is highlighted after initializing the UIPickerView. How do i highlight a particular row or scroll to particular row programmatically?

推荐答案

与往常一样,这是完整记录的。 UIPickerView 应该告诉你,你可能想要的方法是 - selectRow:inComponent:animated:

As always, this is thoroughly documented. The Apple documentation for UIPickerView should tell you that the method you probably want is – selectRow:inComponent:animated:.

这篇关于我可以以编程方式滚动到UIPickerView中的所需行吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆