---
title: subviews
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiview/subviews
---

# subviews

The receiver’s immediate subviews.

## Declaration

```swift
var subviews: [UIView] { get }
```

## Discussion

Discussion You can use this property to retrieve the subviews associated with your custom view hierarchies. The order of the subviews in the array reflects their visible order on the screen, with the view at index 0 being the back-most view. For complex views declared in UIKit and other system frameworks, any subviews of the view are generally considered private and subject to change at any time. Therefore, you should not attempt to retrieve or modify subviews for these types of system-supplied views. If you do, your code may break during a future system update.

## See Also

### Managing the view hierarchy

- [superview](uikit/uiview/superview.md)
- [window](uikit/uiview/window.md)
- [addSubview(_:)](uikit/uiview/addsubview(_:).md)
- [bringSubviewToFront(_:)](uikit/uiview/bringsubviewtofront(_:).md)
- [sendSubviewToBack(_:)](uikit/uiview/sendsubviewtoback(_:).md)
- [removeFromSuperview()](uikit/uiview/removefromsuperview().md)
- [insertSubview(_:at:)](uikit/uiview/insertsubview(_:at:).md)
- [insertSubview(_:aboveSubview:)](uikit/uiview/insertsubview(_:abovesubview:).md)
- [insertSubview(_:belowSubview:)](uikit/uiview/insertsubview(_:belowsubview:).md)
- [exchangeSubview(at:withSubviewAt:)](uikit/uiview/exchangesubview(at:withsubviewat:).md)
- [isDescendant(of:)](uikit/uiview/isdescendant(of:).md)
