Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task 8: Add a C button #8

Closed
petervanhoef opened this issue Mar 19, 2017 · 1 comment
Closed

Task 8: Add a C button #8

petervanhoef opened this issue Mar 19, 2017 · 1 comment
Labels

Comments

@petervanhoef
Copy link
Owner

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.

petervanhoef pushed a commit that referenced this issue Mar 25, 2017
@petervanhoef petervanhoef changed the title Task 8 Task 8: Add a C button Mar 25, 2017
@petervanhoef
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant