Permalink
Browse files

added result indicator to programDisplay

  • Loading branch information...
johndbritton committed Mar 18, 2012
1 parent 9634527 commit 02ff126307c51e7cdd8bd0daafd9ff54ea67b420
Showing with 1 addition and 0 deletions.
  1. +1 −0 calculator/calculator/CalculatorViewController.m
@@ -76,6 +76,7 @@ - (IBAction)operationPressed:(UIButton *)sender {
}
double result = [self.brain performOperation:sender.currentTitle];
self.programDisplay.text = [self.programDisplay.text stringByAppendingString:[NSString stringWithFormat:@"%@ ", sender.currentTitle]];
+ self.programDisplay.text = [self.programDisplay.text stringByAppendingString:[NSString stringWithFormat:@"= "]];
self.display.text = [NSString stringWithFormat:@"%g", result];
}
@end

0 comments on commit 02ff126

Please sign in to comment.