O'Reilly logo

Learning iOS Development: A Hands-on Guide to the Fundamentals of iOS Programming by Erica Sadun, Rod Strougo, Maurice Sharp

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Editing the Year

Make and model are both text-based. You could use text for the year and only show a numeric text keyboard. But that does not help you make sure the user is entering a four-digit year that is within a particular range of years. Instead, you can create a picker-based edit view that is specific to Gregorian dates. (You can even internationalize the picker if you’d like to explore that.)

UIPickerView lets you present longer lists of individual choices or even several side-by-side lists. One place you can find pickers is when you set dates and times for Calendar appointments. Those use the UIDatePicker subclass.

A picker looks like a slot machine with rotors and a number of positions on each rotor. You specify the number of rotors ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required