MMMPureLoadableGroup

Objective-C

@interface MMMPureLoadableGroup : NSObject <MMMPureLoadable>

Swift

class MMMPureLoadableGroup : NSObject, MMMPureLoadableProtocol

Allows to treat several “pure” loadables as one.

The group supports 2 different modes:

  • “all” (this is the default), where the group is considered ‘synced successfully’ when all of its children are ‘synced successfully’;
  • “at least one”, where the group is considered ‘synced successfully’ when at least one of its child loadables is ‘synced successfully’.

This can be used standalone or subclassed (see MMMLoadable+Subclasses.h in this case.)

The ‘did change’ event of the group is triggered when its loadableState changes or, if all objects are loaded, then every time any of the them emits ‘did change’.