---
title: lastObject
framework: photos
role: symbol
role_heading: Instance Property
path: photos/phfetchresult/lastobject
---

# lastObject

The last object in the fetch result.

## Declaration

```swift
var lastObject: ObjectType? { get }
```

## Discussion

Discussion You specify the ordering of a fetch result in the PHFetchOptions object you pass to a fetch method. Returns nil if the fetch result is empty.

## See Also

### Querying a Fetch Result

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