Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 1.28 KB

README.md

File metadata and controls

55 lines (32 loc) · 1.28 KB

PSWeakProxy 中文

docs Pod Version License Platform SwiftCompatible

A proxy for resolve retain cycle,such as NSTimer etc.


Getting Start

Installation with CocoaPods

add follow line into your podfile:

pod 'PSWeakProxy'

Usage

Talk is cheap,this is simple code.

PSWeakProxy *weakSelf = [[PSWeakProxy alloc] initWithObject:self];
self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0
                                            target:weakSelf
                                                selector:@selector(timeIsPassing:)
                                                userInfo:[NSDate date]
                                                 repeats:YES];