Using UIDatePicker

Sometimes you want to ask a user to enter date information. Apple supplies a tidy subclass of UIPickerView to handle several kinds of date and time entry. Figure 9-11 shows the four built-in styles of UIDatePickers you can choose from—for selecting a time, selecting a date, selecting a combination of the two, and a countdown timer.

Image

Figure 9-11 The iPhone offers four stock date picker models. Use the datePickerMode property to select the picker you want to use in your application.

Get The Core iOS Developer’s Cookbook, Fifth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.