草庐IT

operateWithTwoOperands

全部标签

ios - 计算器中的历史(Swift)

我有在应用程序中运行历史记录的代码。我的应用截图:我如何改进它以便在按下时立即显示数字(如视频中所示),而不仅仅是按下=。//Connectedtobutton"="@IBActionfuncequalitySignPressed(sender:UIButton){ifstillTyping{secondOperand=currentInput}dotIsPlaced=falseaddHistory(text:operationSign+displayResultLabel.text!)switchoperationSign{case"+":operateWithTwoOperands