Skip to content

Instantly share code, notes, and snippets.

@jen2
Last active May 7, 2017 19:57
Show Gist options
  • Save jen2/37609643e4306ecc70a848296fdb5925 to your computer and use it in GitHub Desktop.
Save jen2/37609643e4306ecc70a848296fdb5925 to your computer and use it in GitHub Desktop.
Show the unhighlightDeselected method for "Build a World Clock in Objective-C."
-(void)unhighlightDeselected {
NSArray *cities = [@[self.nyc, self.paris, self.moscow, self.hongKong, self.honolulu, self.seattle]mutableCopy];
NSMutableArray *unselectedCities = [NSMutableArray array];
for (UIButton *city in cities) {
if (city != self.selectedButton) {
[unselectedCities addObject:city];
}
}
[unselectedCities setValue:[UIColor blueColor] forKey:@"tintColor"];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment