Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. -(IBAction)equalButton:(id)sender { // Interface Builder action for equal (calculation)
  2. // perform calculation
  3. [self calculateAnswer];
  4.  
  5. // set and display result
  6. [self setCalcAreaNumber:[NSString stringWithFormat:@"%f", calcAnswer]]; // float (double) to string
  7. [self setTextCalcAreaLabel];
  8.  
  9. // set values to support continued calculations, but wipe if you type a number
  10. [self saveValueofAnswer]; // answer -> arg1
  11. [self setInitialCalcAreaInputState:true]; // number key typing will wipe value
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement