<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIView/isDescendant(of:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIView(im)isDescendantOfView:"
  },
  "title" : "isDescendant(of:)"
}
-->

# isDescendant(of:)

Returns a Boolean value indicating whether the receiver is a subview of a given view or identical to that view.

```
func isDescendant(of view: UIView) -> Bool
```

## Parameters

`view`

The view to test against the receiver’s view hierarchy.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the receiver is an immediate or distant subview of `view` or if `view` is the receiver itself; otherwise <doc://com.apple.documentation/documentation/Swift/false>.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)