You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a C button that clears everything (your display, the new UILabel you added above, any pending binary operations, etc.). Ideally, this should leave your Calculator in the same state it was in when you launched it.
The text was updated successfully, but these errors were encountered:
Different options are possible. You can have a function in CalculatorBrain that resets all internal variables. Other option is just to initiate a new model. That way you are sure your model is back in initial state. For this last option, you should verify that the old model is not referenced at all in order to avoid memory leaks.
Add a C button that clears everything (your display, the new
UILabel
you added above, any pending binary operations, etc.). Ideally, this should leave your Calculator in the same state it was in when you launched it.The text was updated successfully, but these errors were encountered: