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

# childForInterfaceOrientationLock

A child view controller to query for the interface orientation lock preference.

```
var childForInterfaceOrientationLock: UIViewController? { get }
```

## Discussion

Override to return a child view controller or `nil`. If you return a view controller, the system uses that view controller’s preference for interface orientation lock. If you
return `nil`, the system uses `self` to get the preference for interface orientation lock. Call [`setNeedsUpdateOfPrefersInterfaceOrientationLocked()`](/documentation/UIKit/UIViewController/setNeedsUpdateOfPrefersInterfaceOrientationLocked())
if the child view controller that the system needs to query for the interface orientation lock preference changes.

---

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)