I have a picker returning 3 components. I was told you can change the size of the views by doing the following, but I am not too sure how to implement this…
implementing the UIPickerViewDelegate method pickerView:widthForComponent: method to size the components (probably 150, 20, and 150, or so).
I see in the documentation you set up a method like this, but dont know what to do next?
- (CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component
{
}
For using this you have to implement
UIPickerViewDelegate…… and assign it to yourpickerView…..if this method is being written in the same class where you are creating
pickerView……then write…..
and in header implement this delegate…
Components are numbered left-to-right.
Thanks,