sam-matthews / iOSCalculator

An iOS Calculator - used as a learning exercise
0 stars 0 forks source link

Stop first number being selected is not an operator. #5

Open sam-matthews opened 7 years ago

sam-matthews commented 7 years ago

Prevent the fist button pressed to be an operator. This gives all sorts of issues.

If the first operator is "-" then the calculation should be "0-". Maybe include a Boolean flag to say this operation has occurred and the next key pressed needs to be a number.