Skip to content

Instantly share code, notes, and snippets.

@binderclip
Last active August 29, 2015 14:17
Show Gist options
  • Save binderclip/f1d102fd0c3a2c07de31 to your computer and use it in GitHub Desktop.
Save binderclip/f1d102fd0c3a2c07de31 to your computer and use it in GitHub Desktop.
OC 定时函数的实现
NSTimer *timer = [NSTimer timerWithTimeInterval:(0.1f) target:self selector:@selector(updateValue:) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
[[NSRunLoop mainRunLoop] addTimer:timer forMode:UITrackingRunLoopMode];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment