【发布时间】:2011-08-30 06:28:13
【问题描述】:
这一段代码有点不对劲
- (void)pickerView:(UIPickerView *)
thePickerView didSelectRow:
(NSInteger)rowinComponent:(NSInteger)component {
if ( row ==1) {
-(IBAction)presstoconvert{
float number1 = ([initamount.text floatValue ]);
float answer = number1 *12;
result.text = [[NSString alloc]initWithFormat:@"%2.f", answer];
}
}
else ( row == 2);{
float number1 = ([initamount.text floatValue ]);
float answer = number1 /12;
result.text = [[NSString alloc]initWithFormat:@"%2.f", answer];
}
}
【问题讨论】: