<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "visionOS: 1.0.0 - 1.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewController/prefersStatusBarHidden",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(py)prefersStatusBarHidden"
  },
  "title" : "prefersStatusBarHidden"
}
-->

# prefersStatusBarHidden

Specifies whether the view controller prefers the status bar to be hidden or shown.

```
var prefersStatusBarHidden: Bool { get }
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the status bar should be hidden or <doc://com.apple.documentation/documentation/Swift/false> if it should be shown.

## Discussion

If you change the return value for this method, call the [`setNeedsStatusBarAppearanceUpdate()`](/documentation/UIKit/UIViewController/setNeedsStatusBarAppearanceUpdate()) method. To specify that a child view controller should control preferred status bar hidden/unhidden state, implement the [`childForStatusBarHidden`](/documentation/UIKit/UIViewController/childForStatusBarHidden) method.

By default, this method returns <doc://com.apple.documentation/documentation/Swift/false> with one exception. For apps linked against iOS 8 or later, this method returns <doc://com.apple.documentation/documentation/Swift/true> if the view controller is in a vertically compact environment.

---

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)