MMMPureLoadableProxy
Objective-C
@interface MMMPureLoadableProxy : MMMPureLoadable <MMMPureLoadable>
Swift
class MMMPureLoadableProxy : MMMPureLoadable, MMMPureLoadableProtocol
Sometimes an API expects a promise but you don’t have a reference to it until some time later, i.e. you need a promise for a promise.
This proxy pretends its contents is unavailable and the state is idle until the actual promise is set. After this all the properties are taken and the calls are forwarded from/to the actual object.
You can inherit this and forward “contents” properties for your kind of loadable.
-
Undocumented
Declaration
Objective-C
@property (nonatomic, nullable) id<MMMPureLoadable> loadable
Swift
var loadable: (any MMMPureLoadableProtocol)? { get set }