---
title: updateController()
framework: quicklookui
role: symbol
role_heading: Instance Method
path: quicklookui/qlpreviewpanel/updatecontroller()
---

# updateController()

Asks the preview panel to update its current controller.

## Declaration

```swift
func updateController()
```

## Discussion

Discussion The preview panel automatically updates its controller (by searching the responder chain) whenever the main or key window changes. You should only invoke this method if the responder chain changes without explicit notice.

## See Also

### Accessing the Preview Panel Controller

- [currentController](quicklookui/qlpreviewpanel/currentcontroller.md)
