RW_DropdownMenu
RW_DropdownMenu copied to clipboard
how can i known which column was clicked?
when clicked first column 0 - 2 and clicked second column row 2, the values is same.
First: i modify protocol in DropdownMenu.m:
- (void)returnSelectedLeftIndex:(NSString *)left RightIndex:(NSString *)right to:
- (void)returnSelectedIndex:(NSInteger)index LeftIndex:(NSString *)left RightIndex:(NSString *)right
Second: change: - (void)selectedFirstValue:(NSString *)first SecondValue:(NSString *)second:
- (void)selectedFirstValue:(NSString *)first SecondValue:(NSString *)second{ NSString *index = [NSString stringWithFormat:@"%@-%@", first, second]; [_buttonIndexArray setObject:index atIndexedSubscript:_buttonSelectedIndex]; //[self returnSelectedLeftIndex:first RightIndex:second]; [self returnSelectedIndex:_buttonSelectedIndex LeftIndex:first RightIndex:second]; }
Using delegate index to be which selected index.
Thanks, change is good!