NSTimer with block callback.
CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries like ZYYTimerAdd in your projects. First, add the following line to your Podfile:
pod 'ZYYTimerAdd' If you want to use the latest features of ZYYTimerAdd use normal external source dependencies.
pod 'ZYYTimerAdd', :git => 'https://github.com/idevzhou/ZYYTimerAdd.git' Drag the ZYYTimerAdd/ZYYTimerAdd/ZYYTimerAdd folder into your project.
+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti repeats:(BOOL)yesOrNo callback:(ZYYVoidBlock)callback; + (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)ti count:(NSInteger)count callback:(ZYYVoidBlock)callback; - (void)fireTimer; - (void)unfireTimer; - (void)invalid;