我想在UIImage
按下 UIButton 时将默认值更改为突出显示。因此,当执行以下代码时,我想将UIImage
另一个代码更改为突出显示。
- (IBAction)buttonOperationPressed:(id)sender {
if (currentOperation == 0) result = currentNumber;
else {
switch (currentOperation) {
case 1:
result = result + currentNumber;
break;
case 2:
result = result - currentNumber;
break;
case 3:
result = result * currentNumber;
break;
case 4:
result = result / currentNumber;
break;
case 5:
currentOperation = 0;
break;
}
}
currentNumber = 0;
calculatorScreen.text = [NSString stringWithFormat:@"%g", result];
if ([sender tag] ==0) result=0;
currentOperation = [sender tag];
userInTheMiddleOfEnteringDecimal = NO;
}