[英]How to show previous selected value of a uipickerview in ios programming
如何在iOS编程中显示UIPickerView的先前选择的值
您必须为此使用两个变量1) currentSelectedIndex
2) prevSelectedIndex
和在
- (void)pickerView:(UIPickerView *)pV didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
prevSelectedIndex = currentSelectedIndex
currentSelectedIndex = row;
//your Code...
}
现在,您可以使用prevSelectedIndex
来获取先前选择的pickerDataSourceArray
值。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.