Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发一个使用 PickerView 的应用程序,但我不知道如何更改它所说的内容。目前它只是说“库比蒂诺,桑尼维尔等”,它不会上升或下降。当我做模拟器时,它只是显示为一个蓝色矩形。
您需要创建 UIPickerViewDataSource 和 UIPickerViewDelegate 来提供数据并配置选择器视图的外观。默认文本值就是 Interface Builder 中显示的值 - 一旦连接到数据源/委托,视图应该在模拟器中显示您的信息。