views:

16

answers:

1

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.

+1  A: 

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.

Thomas Müller