I have code to display the history in the calculator but the signs (+, -, ×, ÷) are taken from the "case" (Photo 1)
How can I make it so that in the history the signs (+, -, ×, ÷) are displayed by the pictures I have set (Photo 2)
@IBAction func equalitySignPressed(sender: UIButton) {
if stillTyping {
secondOperand = currentInput
}
dotIsPlaced = false
addHistory(text: operationSign + displayResultLabel.text!)
switch operationSign {
case "+":
operateWithTwoOperands{$0 + $1}
case "-":
operateWithTwoOperands{$0 - $1}
case "×":
operateWithTwoOperands{$0 * $1}
case "÷":
operateWithTwoOperands{$0 / $1}
default: break
}
}
History:
func addHistory(text: String){
//Add text
resultLabelText.text = resultLabelText.text! + "" + text
}