---
title: "enumerateObjects(options:using:)"
framework: photos
role: symbol
role_heading: Instance Method
path: "photos/phfetchresult/enumerateobjects(options:using:)"
---

# enumerateObjects(options:using:)

Executes the specified block using each object in the fetch result.

## Declaration

```swift
func enumerateObjects(options opts: NSEnumerationOptions = [], using block: @escaping (ObjectType, Int, UnsafeMutablePointer<ObjCBool>) -> Void)
```

## Parameters

- `opts`: A bit mask that specifies the options for the enumeration (whether it should be performed concurrently and whether it should be performed in reverse order).
- `block`: The block to apply to elements in the fetch result. The block takes three parameters:

## Discussion

Discussion By default, the enumeration starts with the first object and continues in order through the fetch result to the last element specified by the index set. Specify the concurrent or reverse options to modify this behavior. This method executes synchronously.

## See Also

### Performing Operations with Objects in a Fetch Result

- [enumerateObjects(at:options:using:)](photos/phfetchresult/enumerateobjects(at:options:using:).md)
- [enumerateObjects(_:)](photos/phfetchresult/enumerateobjects(_:).md)
