---
title: prefersStatusBarHidden
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiviewcontroller/prefersstatusbarhidden
---

# prefersStatusBarHidden

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

## Declaration

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

## Return Value

Return Value true if the status bar should be hidden or false if it should be shown.

## Discussion

Discussion If you change the return value for this method, call the setNeedsStatusBarAppearanceUpdate() method. To specify that a child view controller should control preferred status bar hidden/unhidden state, implement the childForStatusBarHidden method. By default, this method returns false with one exception. For apps linked against iOS 8 or later, this method returns true if the view controller is in a vertically compact environment.

## See Also

### Managing the status bar

- [childForStatusBarHidden](uikit/uiviewcontroller/childforstatusbarhidden.md)
- [childForStatusBarStyle](uikit/uiviewcontroller/childforstatusbarstyle.md)
- [preferredStatusBarStyle](uikit/uiviewcontroller/preferredstatusbarstyle.md)
- [UIStatusBarStyle](uikit/uistatusbarstyle.md)
- [modalPresentationCapturesStatusBarAppearance](uikit/uiviewcontroller/modalpresentationcapturesstatusbarappearance.md)
- [preferredStatusBarUpdateAnimation](uikit/uiviewcontroller/preferredstatusbarupdateanimation.md)
- [setNeedsStatusBarAppearanceUpdate()](uikit/uiviewcontroller/setneedsstatusbarappearanceupdate().md)
