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
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






![Instance Methods and Class Methods in Objective-C
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:
http://www.techytube.com/author/pavel
Instance Methods and Class Methods in Objective-C is very similar to the same concepts implemented in other object oriented programming languages.
Instance methods are the usual methods, and we always need some object(s) to call those specific methods. When we declare and implement them, we always start with the - (minus sign). The syntax for calling an instance method is:
[objectName instanceMethodName];
For class methods we do not need any object created in our program in order to call them.
They always start with the + (plus sign). The syntax for calling a class method is:
[ClassName classMethodName]; Instance Methods and Class Methods in Objective-C](https://i.ytimg.com/vi/sjFLaJD_cgA/mqdefault.jpg)



