Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
You want to allow the users of your app to select a date and time using an intuitive and ready-made user interface.
UIDatePicker is very similar
to the UIPickerView class. The date
picker is in fact a prepopulated picker view. A good example of the
date picker control is in the Calendar app on the iPhone (Figure 2-14).
Let’s get started by first declaring a property of type UIDatePicker and then allocating and
initializing this property and adding it to the view of our view
controller:
#import <UIKit/UIKit.h>
@interface Picking_Date_and_Time_with_UIDatePickerViewController
: UIViewController
@property (nonatomic, strong) UIDatePicker *myDatePicker;
@end