#import <ThingSmartWeakProxy.h>
A proxy used to hold a weak object. It can be used to avoid retain cycles, such as the target in NSTimer or CADisplayLink.
sample code:
@implementation MyView { NSTimer *_timer; }
- (void)initTimer { ThingSmartWeakProxy *proxy = [ThingSmartWeakProxy proxyWithTarget:self]; _timer = [NSTimer timerWithTimeInterval:0.1 target:proxy selector:@selector(tick:) userInfo:nil repeats:YES]; }
- (void)tick:(NSTimer *)timer {...} @end
Definition at line 29 of file ThingSmartWeakProxy.h.
◆ initWithTarget: [1/4]
- (instancetype) initWithTarget: |
|
(id) |
target |
|
Creates a new weak proxy for target.
- Parameters
-
- Returns
- A new proxy object.
◆ initWithTarget: [2/4]
- (instancetype) initWithTarget: |
|
(id) |
target |
|
Creates a new weak proxy for target.
- Parameters
-
- Returns
- A new proxy object.
◆ initWithTarget: [3/4]
- (instancetype) initWithTarget: |
|
(id) |
target |
|
Creates a new weak proxy for target.
- Parameters
-
- Returns
- A new proxy object.
◆ initWithTarget: [4/4]
- (instancetype) initWithTarget: |
|
(id) |
target |
|
Creates a new weak proxy for target.
- Parameters
-
- Returns
- A new proxy object.
◆ proxyWithTarget: [1/4]
+ (instancetype) proxyWithTarget: |
|
(id) |
target |
|
Creates a new weak proxy for target.
- Parameters
-
- Returns
- A new proxy object.
◆ proxyWithTarget: [2/4]
+ (instancetype) proxyWithTarget: |
|
(id) |
target |
|
Creates a new weak proxy for target.
- Parameters
-
- Returns
- A new proxy object.
◆ proxyWithTarget: [3/4]
+ (instancetype) proxyWithTarget: |
|
(id) |
target |
|
Creates a new weak proxy for target.
- Parameters
-
- Returns
- A new proxy object.
◆ proxyWithTarget: [4/4]
+ (instancetype) proxyWithTarget: |
|
(id) |
target |
|
Creates a new weak proxy for target.
- Parameters
-
- Returns
- A new proxy object.
◆ target
The documentation for this class was generated from the following files:
- /Users/humtong/Downloads/Pods_副本/ThingSmartUtil/Build/ThingSmartUtil.xcframework/watchos-arm64_i386_x86_64-simulator/ThingSmartUtil.framework/Headers/ThingSmartWeakProxy.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartUtil/Build/ThingSmartUtil.xcframework/ios-x86_64-simulator/ThingSmartUtil.framework/Headers/ThingSmartWeakProxy.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartUtil/Build/ThingSmartUtil.xcframework/ios-arm64/ThingSmartUtil.framework/Headers/ThingSmartWeakProxy.h
- /Users/humtong/Downloads/Pods_副本/ThingSmartUtil/Build/ThingSmartUtil.xcframework/watchos-arm64_arm64_32_armv7k/ThingSmartUtil.framework/Headers/ThingSmartWeakProxy.h