嗨,我对 iO 编码很陌生,无法让它工作。我尝试根据所选 PickerView 的数组项更改按钮的标签。
(void)pickerView:(UIPickerView *)pickerView
didSelectRow:(NSInteger)row inComponent:(NSInteger)component
{
NSString *buttonLable = [_characters objectAtIndex:[pickerView selectedRowInComponent:0]];
[titleButton setTitle:(NSString *)buttonLable forState:UIControlStateNormal];
}
我认为我定义 buttonLable 的方式有问题,因为它说“@variable 不是 NSString”。
我究竟做错了什么?
谢谢!