Skip to content

Instantly share code, notes, and snippets.

@philk
Created July 10, 2009 17:05
Show Gist options
  • Save philk/144626 to your computer and use it in GitHub Desktop.
Save philk/144626 to your computer and use it in GitHub Desktop.
- (void)updateInterface {
if ([myPoly numberOfSides] > [myPoly minimumNumberOfSides]) {
decreaseButton.enabled = YES;
}
if ([myPoly numberOfSides] < [myPoly maximumNumberOfSides]) {
increaseButton.enabled = YES;
}
if ([myPoly numberOfSides] == [myPoly minimumNumberOfSides]) {
decreaseButton.enabled = NO;
} else if ([myPoly numberOfSides] == [myPoly maximumNumberOfSides]) {
increaseButton.enabled = NO;
}
numberOfSidesLabel.text = [NSString stringWithFormat:@"%d", [myPoly numberOfSides]];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment