且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS 7中的UIPickerView按钮选择器问题

更新时间:2023-12-04 12:26:28

您不能在选择器视图单元格上使用按钮。我使用了工具栏并在其上添加了一个条形按钮项。通过这个

You can't use button on picker view cell. I have used toolbar and added a bar button item on it. By this

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component

您将获得行号并使用它来执行所需的功能。

you will get the row number and use that to perform desired functionality.