开发者

UIPickerView, static data

开发者_如何学运维

In the Clock Application that comes with the iPhone/iPod touch, on the UIPickerView that has hours and minutes, how do we create our own picker views with the text "hours" or "mins" that is static within the UIPickerView? I didn't see any documentation on that if that was some sort of property or anything.

Also, on that same App, they have a button that says

"When Timer Ends Sleep iPod >"

Where the text "When Timer Ends" is left justified, and the "Sleep iPod >" is right justified. How do we do that? Thanks.


I believe you can use -pickerView:titleForRow:forComponent: in your UIPickerViewDelegate to set the "hours" and "minutes" titles.

For your UITableView, create your UITableViewCells with UITableViewCellStyleValue1. "When Timer Ends" goes into textLabel, and "Sleep iPod" goes into detailTextLabel, I believe.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜