---
title: "didAddSubview(_:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiview/didaddsubview(_:)"
---

# didAddSubview(_:)

Tells the view that a subview was added.

## Declaration

```swift
func didAddSubview(_ subview: UIView)
```

## Parameters

- `subview`: The view that was added as a subview.

## Discussion

Discussion The default implementation of this method does nothing. Subclasses can override it to perform additional actions when subviews are added. This method is called in response to adding a subview using any of the relevant view methods.

## See Also

### Related Documentation

- [insertSubview(_:belowSubview:)](uikit/uiview/insertsubview(_:belowsubview:).md)
- [insertSubview(_:aboveSubview:)](uikit/uiview/insertsubview(_:abovesubview:).md)
- [addSubview(_:)](uikit/uiview/addsubview(_:).md)
- [insertSubview(_:at:)](uikit/uiview/insertsubview(_:at:).md)

### Observing view-related changes

- [willRemoveSubview(_:)](uikit/uiview/willremovesubview(_:).md)
- [willMove(toSuperview:)](uikit/uiview/willmove(tosuperview:).md)
- [didMoveToSuperview()](uikit/uiview/didmovetosuperview().md)
- [willMove(toWindow:)](uikit/uiview/willmove(towindow:).md)
- [didMoveToWindow()](uikit/uiview/didmovetowindow().md)
