MMMLoadableObserver
Objective-C
@protocol MMMLoadableObserver <NSObject>
Swift
protocol MMMLoadableObserverProtocol : NSObjectProtocol
Protocol observers of loadable objects should conform to. You can use it directly in your classes observing loadables or employ a proxy object defined below which allows to use blocks or selectors and which won’t forget to remove itself when deallocated.
-
Called whenever the loadable object changes (or sometimes when it might change). Note that in addition to
loadableState
this also coverscontentsAvailable
and the actual “content” properties of the object (i.e. the value of the promise).This is usually called on the main thread.
Declaration
Objective-C
- (void)loadableDidChange:(nonnull id<MMMPureLoadable>)loadable;
Swift
func loadableDidChange(_ loadable: any MMMPureLoadableProtocol)