• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Recreating iPhone alarm Picker
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recreating iPhone alarm Picker


  • Subject: Re: Recreating iPhone alarm Picker
  • From: Roland King <email@hidden>
  • Date: Mon, 19 Oct 2009 22:08:06 +0800

If I wanted to do something like this myself, not a date but some other rotating list of items, I would probably use a UIPickerViewDataSource to tell the UIPicker it has a vast number of rows and I'd start the picker index 1/2 way through that range. Then I'd return a title from pickerView:titleForRow:forComponent: modulus the number of things I actually have in the list.

eg I'd tell the picker I have 20000 rows, start at row 10000, if I had 123 actual pieces of data I'd return value '0' for 9754, 9877, 10000, 10123, 10246 etc. You only need the 123 pieces of data, the rest is just mapping it onto a huge range.

Were I concerned it was really possible to run off the end I'd attempt to find a reasonable point (perhaps at selection) to reset the index back to a central value again.

In this case however .. the built-in date or time pickers are what you want.

On 19-Oct-2009, at 9:49 PM, Luke the Hiesterman wrote:

Just use a UIDatePicker on mode UIDatePickerModeTime or UIDatePickerModeDateAndTime and you should be all set.

Luke

On Oct 19, 2009, at 6:44 AM, Eric E. Dolecki wrote:

I have a fairly noob question in regards to recreating an alarm view using a
Picker control.
On the iPhone, the values for hours & minutes wrap around - and I was
wondering if this is accomplished by repeating values in an NSArray (so many
that you're not likely to scroll to them), or are they using another trick
to get the values to loop around in the control?


I am really just making my own alarm setting UI using the Picker.

Thanks,
Eric
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Recreating iPhone alarm Picker (From: "Eric E. Dolecki" <email@hidden>)
 >Re: Recreating iPhone alarm Picker (From: Luke the Hiesterman <email@hidden>)

  • Prev by Date: Re: Recreating iPhone alarm Picker
  • Next by Date: Re: Programming Style: Method Definition with or without a semicolon.
  • Previous by thread: Re: Recreating iPhone alarm Picker
  • Next by thread: Neophyte Question: Connecting to nib objects
  • Index(es):
    • Date
    • Thread