I was working on creating an app that uses a UIPickerView. I made the view but I am trying to make a certain button change what it does. Please help.
UIPickerView and many other controls use delegate pattern to inform you about events happening.
To use it add
to your class type definition(@interface line) and after that set the delegate of UIPickerView to your class like this:
myUIPickerView.delegate = self;
Then you can write the following method in your class and row
is the index you want:
- (void)pickerView:(UIPickerView *)pickerView
didSelectRow:(NSInteger)row
inComponent:(NSInteger)component
{
switch(row)
{
//...
}
}