---
title: "contains(_:)"
framework: photos
role: symbol
role_heading: Instance Method
path: "photos/phfetchresult/contains(_:)"
---

# contains(_:)

Returns whether the specified object is present in the fetch result.

## Declaration

```swift
func contains(_ anObject: ObjectType) -> Bool
```

## Parameters

- `anObject`: An object.

## Return Value

Return Value true if anObject is present in the fetch result, otherwise false.

## Discussion

Discussion This method determines whether anObject is present in the fetch result by sending an == message to each of the fetch result’s objects (and passing anObject as the parameter to each == message).

## See Also

### Querying a Fetch Result

- [count](photos/phfetchresult/count.md)
- [countOfAssets(with:)](photos/phfetchresult/countofassets(with:).md)
- [firstObject](photos/phfetchresult/firstobject.md)
- [lastObject](photos/phfetchresult/lastobject.md)
- [object(at:)](photos/phfetchresult/object(at:).md)
- [subscript(_:)](photos/phfetchresult/subscript(_:).md)
- [objects(at:)](photos/phfetchresult/objects(at:).md)
