---
title: "level(of:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/level(of:)"
---

# level(of:)

Finds the hierarchical level of the specified item in the section snapshot.

## Declaration

```swift
func level(of item: ItemIdentifierType) -> Int
```

## Discussion

Discussion A level of 0 means the item is at the root level of the section snapshot.

## See Also

### Getting item metrics

- [index(of:)](uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/index(of:).md)
- [parent(of:)](uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/parent(of:).md)
- [contains(_:)](uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/contains(_:).md)
- [isVisible(_:)](uikit/nsdiffabledatasourcesectionsnapshot-swift.struct/isvisible(_:).md)
