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

# didAddSubview(_:)

Overridden by subclasses to perform additional actions when subviews are added to the view.

## Declaration

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

## Parameters

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

## Discussion

Discussion This method is invoked by addSubview(_:).

## See Also

### Responding to View-Related Notifications

- [viewDidMoveToSuperview()](appkit/nsview/viewdidmovetosuperview().md)
- [viewDidMoveToWindow()](appkit/nsview/viewdidmovetowindow().md)
- [viewWillMove(toSuperview:)](appkit/nsview/viewwillmove(tosuperview:).md)
- [viewWillMove(toWindow:)](appkit/nsview/viewwillmove(towindow:).md)
- [willRemoveSubview(_:)](appkit/nsview/willremovesubview(_:).md)
