UIDatePicker customisation and IBAction methods @techytube
UIDatePicker customisation and IBAction methods  @techytube
Uploaded November 2012 | Updated September 2026, 2 weeks ago
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
techytube.com/author/pavel

A UIDatePicker class allow us to customise the objects of its type. To do that, we have 4 options:
UIDatePickerModeTime
UIDatePickerModeDate
UIDatePickerModeDateAndTime
UIDatePickerModeCountDownTimer
, which represent the values of an Enum type in the iOS SDK. Usually we do that in Xcode Interface Builder, if the date-pickers are created visually as well.

When we interact with the UIDatePicker objects, we can call different event methods. The most common (which also comes as the default option when making the IBAction connection) is:
"- (IBAction)datePickerValueChanged:(id)sender".

If we want to get the value of the selected date and/or time from out picker in one of these methods, we can refer to the IBOutlet object or property if we have one, or we can change the parameter type from "id" to "UIDatePicker *", and then use the sender parameter-object (which is the actual UIDatePicker object).

For more information, you can check the Apple's online Documentation at:

developer.apple.com/library/ios/#documentation/uikit/reference/UIDatePicker_Class/Reference/UIDatePicker.html
UIDatePicker customisation and IBAction methodsWorking with UISlider objects in iOSWindows 8 Development - Data Binding XAMLUser And Group Administration On Linux Part 1 of 4Windows 8 Development - XAML Design Tools Part 2The differences between xib files and storyboards in iOS developmentWindows 8 Development - Creating Styles XAMLInstance Methods and Class Methods in Objective-CCreating a simple class in Objective-CWindows 8 Development - Navigating Between Pages XAMLWindows 8 - Windows update and updating store appsBlocks in Objective-C
techytube |

UIDatePicker customisation and IBAction methods

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER