GREYDataEnumerator

@interface GREYDataEnumerator : NSEnumerator

An block-based enumerator that repeatedly invokes the block to return the next object.

  • @remark init is not an available initializer. Use the other initializers.

    Declaration

    Objective-C

    - (nonnull instancetype)init;
  • Instantiates the enumerator with custom information and a block to return the next object.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithUserInfo:(nonnull id)userInfo
                                       block:(nonnull id _Nonnull (^)(id _Nonnull))
                                                 nextObjectBlock;

    Swift

    init(userInfo: Any, block nextObjectBlock: @escaping (Any) -> Any)

    Parameters

    userInfo

    Custom object that is passed into the block. Use this for passing any additional information required by the block.

    nextObjectBlock

    A block that is invoked to return the next object in the enumerator.

    Return Value

    An instance of GREYDataEnumerator, initialized with the specified information.

  • Declaration

    Objective-C

    - (id _Nullable)nextObject;

    Swift

    func nextObject() -> Any?

    Return Value

    The next object in the enumerator returned by the @c nextObjectBlock.

  • Declaration

    Objective-C

    - (nonnull NSArray *)allObjects;

    Swift

    func allObjects() -> [Any]

    Return Value

    An array of all the objects in the enumerator.