FWLoader
@interface FWLoader<__covariant InputType, __covariant OutputType> : NSObject
通用加载器,添加处理句柄后指定输入即可加载输出结果
-
添加block加载器,返回标志id
Declaration
Objective-C
- (nonnull NSString *)addBlock: (nonnull OutputType _Nullable (^)(InputType _Nonnull __strong))block;
-
添加target和action加载器,返回标志id
Declaration
Objective-C
- (nonnull NSString *)addTarget:(nonnull id)target action:(nonnull SEL)action;
-
指定标志id移除加载器
Declaration
Objective-C
- (void)remove:(nonnull NSString *)identifier;
-
移除所有的加载器
Declaration
Objective-C
- (void)removeAll;
-
依次执行加载器,直到加载成功
Declaration
Objective-C
- (nullable OutputType)load:(nonnull InputType)input;