iOS Create a Date Picker


Example

Swift

let datePicker = UIDatePicker(frame: CGRect(x: 0, y: 0, width: 320, height: 200)       

Objective-C

UIDatePicker *datePicker = [[UIDatePicker alloc] initWithFrame:CGRectMake(x: 0, y: 0, width: 320, height: 200)];