FWDelegateProxy

@interface FWDelegateProxy : NSObject

事件协议代理基类,可继承重写事件代理方法

  • 代理事件协议

    Declaration

    Objective-C

    @property (nonatomic, readonly) Protocol *_Nonnull protocol;
  • 事件代理对象

    Declaration

    Objective-C

    @property (nonatomic, weak, nullable) id delegate;
  • 初始化事件协议代理对象

    Declaration

    Objective-C

    - (nonnull instancetype)initWithProtocol:(nonnull Protocol *)protocol;

    Parameters

    protocol

    代理协议

    Return Value

    代理对象

  • 初始化事件协议代理对象

    Declaration

    Objective-C

    + (nonnull instancetype)proxyWithProtocol:(nonnull Protocol *)protocol;

    Parameters

    protocol

    代理协议

    Return Value

    代理对象

  • 使用block动态实现selector

    Declaration

    Objective-C

    - (void)setSelector:(nonnull SEL)selector withBlock:(nullable id)block;

    Parameters

    selector

    目标方法

    block

    实现的block

  • 获取动态实现block

    Declaration

    Objective-C

    - (nullable id)blockForSelector:(nonnull SEL)selector;

    Parameters

    selector

    目标方法

    Return Value

    实现的block