从Picker View获取选定值的功能

时间:2018-02-18 13:42:47

标签: ios swift uipickerview

我在创建一个函数时遇到问题,该函数将从我的应用程序的选择器轮返回所选值。

这是我到目前为止所做的:

List<SynonymEntry>

1 个答案:

答案 0 :(得分:0)

-(IBAction)doneYearPickerAction:(id)sender
{
    if ([strPickerSelectedYearIndex isEqualToString:@""]) {
        self.yearTxt.text = [yearArr objectAtIndex:0];
    }else{
        self.yearTxt.text = [yearArr objectAtIndex:[strPickerSelectedYearIndex intValue]];
    }
    // hides year pickerview
    [_yearPickerView setHidden: YES];
}
相关问题