<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UINavigationControllerDelegate/navigationController(_:willShow:animated:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(pl)UINavigationControllerDelegate(im)navigationController:willShowViewController:animated:"
  },
  "title" : "navigationController(_:willShow:animated:)"
}
-->

# navigationController(_:willShow:animated:)

Notifies the delegate before the navigation controller displays a view controller’s view and navigation item properties.

```
optional func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool)
```

## Parameters

`navigationController`

The navigation controller that is showing the view and properties of a view controller.

`viewController`

The view controller whose view and navigation item properties are being shown.

`animated`

<doc://com.apple.documentation/documentation/Swift/true> to animate the transition; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)