UIPickerView,静态数据

时间:2010-07-05 02:44:38

标签: iphone uibutton uipickerview

在iPhone / iPod touch附带的时钟应用程序中,在UIPickerView上有几小时和几分钟,我们如何使用UIPickerView中静态的文本“小时”或“分钟”创建自己的选择器视图?如果那是某种财产或任何东西,我没有看到任何文件。

此外,在同一个应用程序中,他们有一个显示

的按钮
"When Timer Ends Sleep iPod >"

文本“When Timer Ends”左对齐,以及“Sleep iPod>”是对的。我们怎么做?感谢。

1 个答案:

答案 0 :(得分:1)

我相信您可以在UIPickerViewDelegate中使用-pickerView:titleForRow:forComponent:来设置“小时”和“分钟”标题。

对于UITableView,请使用UITableViewCellStyleValue1创建UITableViewCells。 “当计时器结束时”进入textLabel,“睡眠iPod”进入detailTextLabel,我相信。