[英]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.