-2

我是初学者开发人员......我有 NSUserDefaults 来获取 UIPicker 选择和一个 double 值来加载 UIPicker 的选择。

 NSUserDefaults *pickerViewSelectionDefaults = [NSUserDefaults standardUserDefaults];
        [pickerWork selectRow:[pickerViewSelectionDefaults integerForKey:@"pickerSelectionMinWork"] inComponent:0 animated:YES];

double dobMinute = [[NSString stringWithFormat:@"%f", [[minArray objectAtIndex:[pickerWork selectedRowInComponent:0]] floatValue]] doubleValue]*60;

如何替换selectedRowInComponent:selectRow:inComponent:animated:因为我有这个错误:

将“void”发送到不兼容类型“NSUInteger”(又名“unsigned long”)的参数

提前致谢!

4

1 回答 1

0

改变

  double dobMinute = [[NSString stringWithFormat:@"%f", [[minArray objectAtIndex:[pickerWork selectedRowInComponent:0]] floatValue]] doubleValue]*60;

double dobMinute = [pickerViewSelectionDefaults integerForKey:@"pickerSelectionMinWork"]*60;
于 2015-08-18T07:46:34.720 回答