Where is it proper to add an UIDatePicker? Should I add it in viewDidLoad? Or in loadView?
This UIDatePicker should be a subview of the main view, and will be displayed the entire time that this viewController's view is displayed.
Thank you!
Where is it proper to add an UIDatePicker? Should I add it in viewDidLoad? Or in loadView?
This UIDatePicker should be a subview of the main view, and will be displayed the entire time that this viewController's view is displayed.
Thank you!
It depends on whether you are loading your view from a nib or programmatically.
If you are loading from a nib, you want to use viewDidLoad.
If you are loading programmatically, you can use either, but to keep all of your view loading logic in one method, you should use loadView.