---
title: viewWillAppear()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nstitlebaraccessoryviewcontroller/viewwillappear()
---

# viewWillAppear()

Called after the title bar accessory view controller’s view has been loaded into memory is about to be added to the view hierarchy in the window.

## Declaration

```swift
func viewWillAppear()
```

## Discussion

Discussion This method is called when the accessory view is about to be added to the window’s view hierarchy or the window is about to become visible, such as coming to the front or becoming unhidden. If you override this method, you must call super in your implementation.

## See Also

### Responding to view events

- [viewDidAppear()](appkit/nstitlebaraccessoryviewcontroller/viewdidappear().md)
- [viewDidDisappear()](appkit/nstitlebaraccessoryviewcontroller/viewdiddisappear().md)
