making a never-ending pickerview?

Discussion in 'iOS Programming' started by ElysianEagle, Jun 29, 2009.

  1. ElysianEagle macrumors newbie

    Joined:
    Jun 29, 2009
    #1
    basically i need to create a UIPickerView which the user can use to pick some stuff. i know how to create a "regular" UIPickerView, but in this particular case it has to be like the UIDatePicker, in which the user can go forwards/backwards endlessly (there's no wrap around because the data is always different).

    how would i go about doing this? i'm hoping for some sort of sliding-window like algorithm in which i only have to keep the 10 or so items closest to the currently viewed item in memory...

    thanks!
     
  2. Saladinos macrumors 68000

    Saladinos

    Joined:
    Feb 26, 2008
    #2
    This is a fairly complex thing to do. If you need infinite selections (i.e. numbers), a textField with a numerical keyboard is probably best. People don't like scrolling infinitely long pickerViews.

    Basically, if you need an infinite pickerView, there's a better way to do what you're trying to do. Infinite choices are bad for user experience.
     
  3. ElysianEagle thread starter macrumors newbie

    Joined:
    Jun 29, 2009
    #3
    hey,

    thanks for the reply. actually to be more specific, what i need is a UIDatePicker but with a Coptic Calendar, and the built-in calendars won't do =(

    I guess i'm gonna have to subclass NSCalendar and build in my own calendar...so it looks like it's going be a lot of work =(
     
  4. Saladinos macrumors 68000

    Saladinos

    Joined:
    Feb 26, 2008
    #4
    You might also want to try bringing it up with Apple as a localisation issue. Submit a bug report and mention it on the mailing lists. Unfortunately, there's no localisation list, but you'll probably be able to get help through Cocoa-dev: http://lists.apple.com/mailman/listinfo/cocoa-dev
     
  5. firewood macrumors 604

    Joined:
    Jul 29, 2003
    Location:
    Silicon Valley
    #5
    You can try multiple repeating sections, and always set it to the middle section with the exact same visible value when the user scrolls to a repeating section above or below.
     

Share This Page