代码之家  ›  专栏  ›  技术社区  ›  Leonardo

UIPickerView关于选择第一个值的问题

  •  3
  • Leonardo  · 技术社区  · 14 年前

    - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { 
     // method implementation...
    }
    

    我错过了什么?还有别的办法吗? 另外,是否可以在不移动选择器的情况下获取选定值?因为我有一个包含UITextField和UIPickerView等组件的视图,我需要扫描整个视图以获取组件值。

    谢谢

    1 回复  |  直到 14 年前
        1
  •  3
  •   hotpaw2    14 年前

    您可以使用selectedRowInComponent:方法获取选择,而无需等待使用操作。