---
title: didMoveToSuperview()
framework: uikit
role: symbol
role_heading: Instance Method
path: uikit/uiview/didmovetosuperview()
---

# didMoveToSuperview()

Tells the view that its superview changed.

## Declaration

```swift
func didMoveToSuperview()
```

## Discussion

Discussion The default implementation of this method does nothing. Subclasses can override it to perform additional actions whenever the superview changes.

## See Also

### Observing view-related changes

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