Changes

Jump to: navigation, search

Using the iOS 7 UIPickerView and UIDatePicker Components

30 bytes added, 20:29, 11 October 2013
Designing the User Interface
Select the Main.storyboard file and drag and drop the Date Picker, Label and Button components from the Object Library panel (View -> Utilities -> Show Object Library) onto the view and modify and position the layout so that the view resembles Figure 29 2:
<google>ADSDAQBOX_FLOW</google>
[[Image:ios_7_datepicker_example_ui.png|The user interface layout for an iOS 7 UIDatePicker example]]
Select the Date Picker object in the view canvas, display the Assistant Editor panel and verify that the editor is displaying the contents of the DatePickerViewController.h file. Ctrl-click on the Date Picker object and drag to a position just below the @interface line in the Assistant Editor. Release the line and in the resulting connection dialog establish an outlet connection named datePicker. Repeat this step to connect the Label object to an outlet property named dateLabel.
Finally, Ctrl-click on the Button object, drag the line to the Assistant Editor panel and configure an Action connection on the Touch Up Inside event to a method named getSelection.
== Coding the Date Picker Example Functionality ==

Navigation menu