How to detect changes on UIPickerView ?

Posted by tristaf on Stack Overflow See other posts from Stack Overflow or by tristaf
Published on 2010-04-02T08:54:36Z Indexed on 2010/04/02 9:03 UTC
Read the original article Hit count: 288

Filed under:
|
|

I want to detect changes of UIPickerView value.

If UIPickerView respond to addTarget i used a code like this:

-(void) valueChange:(id)sender {
change = YES;

} 

UIPickerView *questionPicker = [[UIPickerView alloc] init]; 
[questionPicker addTarget:self action:@selector(valueChange:) forControlEvents:UIControlEventValueChanged];

How can i do same things but in a correct way ? Thanks

© Stack Overflow or respective owner

Related posts about iphone

Related posts about uipickerview