Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ElysianEagle

macrumors newbie
Original poster
Jun 29, 2009
7
0
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!
 
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.
 
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 =(
 
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 =(

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
 
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.