Hi all,
In my application I have a two component UI Picker, I have coded the program so that when a user selects value in col 1 or col 2 in the Picker a label is updated with what is selected.
This works pretty fine until I tested it out on my iPhone last night I noticed that when I spin both picker component wheels at the same time back and forth and let go the picker selected values might show
col1 = green col2 = navy
However my label just shows Green - Black (to me it seems like some form of delay perhaps through the if statement which I coded.
Code:
- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
if (component == kSecondaryColourComponent)
{
part2 = [self.SecondaryColourTypes objectAtIndex:row];
} else {
part1 = [self.PrimaryColourTypes objectAtIndex:row];
}
NSString *result = [NSString stringWithFormat:@"Your Selected Colours are: %@%@", part1, part2];
NSLog(@"Your Selected Colours are: %@%@", part1, part2);
labelColour.text = result;
}
Any tips would be appreciated.
Thanks Aaron