正如我的标题所说,我怎样才能从UIPickerView
获得选定的价值?
它是否遵循委托方法用于实现或不建议我?
- (void)pickerView:(UIPickerView *)pickerView didSelectRow: (NSInteger)row inComponent:(NSInteger)component
答案 0 :(得分:2)
您可以通过
从UIPickerView
中获取选定的值
NSString *selValue = [myArrayList objectAtIndex:[_myPickerView selectedRowInComponent:N]] // Here "N" is component like 0 or whatever.
NSLog (@"%@", selValue);