方案一:
引用中间件,NSProxy
创建一个继承自NSProxy代理对象的子类:GHProxy
.h
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface GHProxy : NSObject
+ (instancetype)proxyWithTarget:(id)target;
@property (weak, nonatomic) id target;
@end
方案一:
引用中间件,NSProxy
创建一个继承自NSProxy代理对象的子类:GHProxy
.h
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface GHProxy : NSObject
+ (instancetype)proxyWithTarget:(id)target;
@property (weak, nonatomic) id target;
@end