Skip to content

Instantly share code, notes, and snippets.

@jen2
Last active May 7, 2017 14:57
Show Gist options
  • Save jen2/6b37fc9ea82d1296c4aa8f038c56736d to your computer and use it in GitHub Desktop.
Save jen2/6b37fc9ea82d1296c4aa8f038c56736d to your computer and use it in GitHub Desktop.
Implementation for setTappedCityTimer: andButton: method in "Build a World Clock in Objective-C."
-(void)setTappedCityTimer {
[self.timer invalidate];
self.timer = nil;
[self setDateTimeLabelsWithTimeZone];
self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(setDateTimeLabelsWithTimeZone) userInfo:nil repeats:YES];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment