Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does UIPickerView's selectRow:inComponent:animated: call pickerView:didSelectRow:inComponent:?

Tags:

uipickerview

Does UIPickerView's selectRow:inComponent:animated: call pickerView:didSelectRow:inComponent:? Otherwise, can I just call it myself?

Thanks

like image 799
joshim5 Avatar asked Aug 09 '11 19:08

joshim5


1 Answers

You do have to call it manually and you do it though the delegate.

// In this example the UIPickerView object is in a property
...
self.pickerView.datasource = self;
self.pickerView.delegate = self;

// Selects the row in the specified component
[self.pickerView selectRow:0 inComponent:0 animated:NO];

// Manually calls pickerView:didSelectRow:inComponent:
[self pickerView:self.pickerView didSelectRow:0 inComponent:0];
like image 161
Matt Tang Avatar answered Sep 27 '22 23:09

Matt Tang