<!--
{
  "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/UIViewController/view",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(py)view"
  },
  "title" : "view"
}
-->

# view

The view that the controller manages.

```
var view: UIView! { get set }
```

## Discussion

This property represents the root view of the view controller’s view hierarchy. The default value of this property is `nil`.

If you access this property when its value is `nil`, the view controller automatically calls the [`loadView()`](/documentation/UIKit/UIViewController/loadView()) method and returns the resulting view.

Each view controller is the sole owner of its view object. Don’t associate the same view object with multiple view controllers. The only exception is that a container view controller implementation may add another view controller’s view object to its own view hierarchy. Before adding the subview, the container must first call its [`addChild(_:)`](/documentation/UIKit/UIViewController/addChild(_:)) method to create a parent-child relationship between the two view controller objects.

Because accessing this property can cause the view to be loaded automatically, you can use [`isViewLoaded`](/documentation/UIKit/UIViewController/isViewLoaded) to determine if the view is currently in memory. Unlike this property, [`isViewLoaded`](/documentation/UIKit/UIViewController/isViewLoaded) doesn’t force the loading of the view if it’s not currently in memory.

For more information about how a view controller loads and unloads its view, see [Managing your app’s life cycle](/documentation/UIKit/managing-your-app-s-life-cycle).

---

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)