NSTimer alternative that doesn't retain the target
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
Classes userinfo nil check Jul 7, 2015
Demo init Jul 7, 2015
.gitignore init Jul 7, 2015
HWWeakTimer.podspec add podspec Jul 7, 2015
LICENSE init Jul 7, 2015
README.md init Jul 7, 2015

README.md

HWWeakTimer

Description

NSTimer alternative that doesn't retain the target.

How to Use

You can create a NSTimer with target and selector and the NSTimer will not maintain a strong reference to target:

+ (NSTimer *) scheduledTimerWithTimeInterval:(NSTimeInterval)interval
                                      target:(id)aTarget
                                    selector:(SEL)aSelector
                                    userInfo:(id)userInfo
                                     repeats:(BOOL)repeats;

Or you can use block to create a NSTimer:

+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)interval
                                      block:(HWTimerHandler)block
                                   userInfo:(id)userInfo
                                    repeats:(BOOL)repeats;

License

MIT