Loading...
Uploaded by DeathRageUltra on Jun 19, 2011
Finished implementing simple calculator app for Stanford CS193P course for Fall 2010.More information about the class can be found here: http://www.stanford.edu/class/cs193p/cgi-bin/drupal/downloads-2010-fall
Education
Standard YouTube License
this seemed to work for me:
- (IBAction)plusMinusPressed { if ([self.display.text hasPrefix:@"-"]){ self.display.text = [self.display.text substringFromIndex:1]; } else { self.display.text = [NSString stringWithFormat:@"-%@", self.display.text]; }
}
atesfai 5 days ago
@DeathRageUltra
Any chance you can tell me how to do the +/- part? or show me the code for it please?
S7347TH7 1 week ago
@palmloyal
@property(nonatomic) BOOL userHasEnteredADecimalPoint;
eltrading 2 weeks ago
I am doing the 2011 course,but cannot figure out how to prevent additional decimals from being entered. Can you please help?
palmloyal 3 weeks ago
Wow...and i can barely finish a "Hello World" program!
kgera95 6 months ago
Ah I finally got it finished as well :)
00melo00 7 months ago
Awesome! How did you do it? I can't really grasp the objective C language yet... :-/ I only got the first part of the assignment :P
Load more suggestions
this seemed to work for me:
- (IBAction)plusMinusPressed { if ([self.display.text hasPrefix:@"-"]){ self.display.text = [self.display.text substringFromIndex:1]; } else { self.display.text = [NSString stringWithFormat:@"-%@", self.display.text]; }
}
atesfai 5 days ago
@DeathRageUltra
Any chance you can tell me how to do the +/- part? or show me the code for it please?
S7347TH7 1 week ago
@palmloyal
@property(nonatomic) BOOL userHasEnteredADecimalPoint;
eltrading 2 weeks ago
I am doing the 2011 course,but cannot figure out how to prevent additional decimals from being entered. Can you please help?
palmloyal 3 weeks ago
Wow...and i can barely finish a "Hello World" program!
kgera95 6 months ago
Ah I finally got it finished as well :)
00melo00 7 months ago
Awesome! How did you do it? I can't really grasp the objective C language yet... :-/ I only got the first part of the assignment :P
00melo00 7 months ago