Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><em>Going from comments here:</em></p> <p>I suggest you to try this one approach.</p> <ol> <li>Creating <strong>one</strong> <code>UIPickerView</code>.</li> <li>Setting its parameters (step 1 in class that implements <code>UIPickerViewDataSource</code>): <ol> <li>Implement <code>- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView</code> that will provide number of components. In your case it is <strong>3</strong> : <code>return 3;</code></li> <li>Implement <code>- (NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component</code> that will return the number of row for each component.</li> </ol></li> <li>Setting its parameters (step 1 in class that implements <code>UIPickerViewDelegate</code>): <ol> <li>Implement <code>- (UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view</code> which will return <code>UILabel</code> for component <strong>0</strong> and <strong>1</strong> and <code>UIView</code> with two <code>UILabel</code>'s as subview (gray one and black one) for component <strong>2</strong></li> </ol></li> </ol> <p>Also you can make more customization by implementing other methods in delegate class:</p> <p><strong>Setting the Dimensions of the Picker View</strong></p> <pre><code>– pickerView:rowHeightForComponent: – pickerView:widthForComponent: </code></pre> <p><strong>Setting the Content of Component Rows</strong></p> <pre><code>– pickerView:titleForRow:forComponent: </code></pre> <p>Complete list of methods you can find here: <a href="http://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIPickerViewDelegate_Protocol/Reference/UIPickerViewDelegate.html" rel="nofollow">UIPickerViewDelegate Protocol Reference</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload