<!--
{
  "availability" : [
    "iOS: 27.1.0 -",
    "iPadOS: 27.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIArrangementViewController",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIArrangementViewController"
  },
  "title" : "UIArrangementViewController"
}
-->

# UIArrangementViewController

A view controller that presents its container view controllers through an arrangement.

```
@MainActor class UIArrangementViewController
```

## Overview

You create an arrangement view controller and set a primary and secondary view controller. The arrangement view controller computes a layout for its content based on the context it is presented in, including the available size, size class, and hardware features.

Use [`updateArrangement(_:animated:)`](/documentation/UIKit/UIArrangementViewController/updateArrangement(_:animated:)) to choose how the arrangement view lays out its content. The default style is [`UISplitArrangement`](/documentation/UIKit/UISplitArrangement-swift.struct). The other built-in style is [`UIOverlayArrangement`](/documentation/UIKit/UIOverlayArrangement-swift.struct).

### Overlay arrangements

An overlay arrangement layers the primary view on top of the secondary view in z-order. This layout is well-suited for full-screen experiences like media players, where playback controls overlay a video surface:

```swift
let arrangementVC = UIArrangementViewController()

let primaryVC = PrimaryViewController()
arrangementVC.setViewController(primaryVC, for: .primary)

let secondaryVC = SecondaryViewController()
arrangementVC.setViewController(secondaryVC, for: .secondary)

arrangementVC.updateArrangement(.overlay.axes(.horizontal))
```

When the environment changes, such as when a foldable device is folded, the overlay arrangement can transition its views from a layered layout into a side-by-side layout. Use [`axes(_:)`](/documentation/UIKit/UIOverlayArrangement-swift.struct/axes(_:)) to control which axes are supported.

### Split arrangements

A split arrangement places the primary and secondary views side-by-side along one or more axes. Use this layout for experiences that display two distinct pieces of content simultaneously, such as a music player alongside its lyrics:

```swift
let arrangementVC = UIArrangementViewController()

let primaryVC = PrimaryViewController()
arrangementVC.setViewController(primaryVC, for: .primary)

let secondaryVC = SecondaryViewController()
arrangementVC.setViewController(secondaryVC, for: .secondary)

arrangementVC.updateArrangement(.split.axes(.horizontal))
```

The split arrangement adapts its axis based on the available size and size class. You can constrain which axes the split supports using [`axes(_:)`](/documentation/UIKit/UISplitArrangement-swift.struct/axes(_:)).

## Topics

### Creating an arrangement view controller

[`init()`](/documentation/UIKit/UIArrangementViewController/init())

Creates an arrangement view controller.

### Configuring the arrangement

[`protocol Arrangement`](/documentation/UIKit/UIArrangementViewController/Arrangement)

A type that describes how an arrangement view controller lays out its view controllers.

[`@interface UIArrangement : NSObject`](/documentation/UIKit/UIArrangement)

A type that describes how an arrangement view controller lays out its view controllers.

[`struct UIOverlayArrangement`](/documentation/UIKit/UIOverlayArrangement-swift.struct)

An arrangement that overlays views.

[`@interface UIOverlayArrangement : UIArrangement`](/documentation/UIKit/UIOverlayArrangement-c.class)

An arrangement that overlays views.

[`struct UISplitArrangement`](/documentation/UIKit/UISplitArrangement-swift.struct)

An arrangement that splits views.

[`@interface UISplitArrangement : UIArrangement`](/documentation/UIKit/UISplitArrangement-c.class)

An arrangement that splits views.

[`func updateArrangement<A>(A, animated: Bool)`](/documentation/UIKit/UIArrangementViewController/updateArrangement(_:animated:))

Updates the arrangement of the view controller.

[`- (void) updateArrangement:(UIArrangement *) arrangement;`](/documentation/UIKit/UIArrangementViewController/updateArrangement:)

Updates the arrangement of the view controller.

[`- (void) updateArrangement:(UIArrangement *) arrangement animated:(BOOL) animated;`](/documentation/UIKit/UIArrangementViewController/updateArrangement:animated:)

Updates the arrangement of the view controller.

### Managing arrangement view controllers

[`struct ViewPlacement`](/documentation/UIKit/UIArrangementViewController/ViewPlacement)

A placement of a view controller within an arrangement view controller.

[`enum UIArrangementViewControllerViewPlacement : NSInteger;`](/documentation/UIKit/UIArrangementViewControllerViewPlacement)

A placement of a view within an arrangement view controller.
Use this type to define placement for container views within the arrangement view controller.

[`func viewController(for: UIArrangementViewController.ViewPlacement) -> UIViewController?`](/documentation/UIKit/UIArrangementViewController/viewController(for:))

The view controller in the arrangement for the provided placement.

[`- (UIViewController *) viewControllerForPlacement:(UIArrangementViewControllerViewPlacement) placement;`](/documentation/UIKit/UIArrangementViewController/viewControllerForPlacement:)

The view controller in the arrangement for the provided placement.

[`func setViewController(UIViewController?, for: UIArrangementViewController.ViewPlacement, animated: Bool)`](/documentation/UIKit/UIArrangementViewController/setViewController(_:for:animated:))

Sets the view controller in the arrangement for a specific placement.

[`- (void) setViewController:(UIViewController *) viewController forPlacement:(UIArrangementViewControllerViewPlacement) placement;`](/documentation/UIKit/UIArrangementViewController/setViewController:forPlacement:)

Sets the view controller in the arrangement for a specific placement.

[`- (void) setViewController:(UIViewController *) viewController forPlacement:(UIArrangementViewControllerViewPlacement) placement animated:(BOOL) animated;`](/documentation/UIKit/UIArrangementViewController/setViewController:forPlacement:animated:)

Sets the view controller in the arrangement for a specific placement.

[`func placement(for: UIViewController) -> UIArrangementViewController.ViewPlacement?`](/documentation/UIKit/UIArrangementViewController/placement(for:))

Returns the placement for the provided view controller in the arrangement.

[`- (UIArrangementViewControllerViewPlacement) placementForViewController:(UIViewController *) viewController;`](/documentation/UIKit/UIArrangementViewController/placementForViewController:)

The placement for the provided view controller in the arrangement.
Will return `UIArrangementViewControllerViewPlacementNone` if the provided view
controller is not a view controller provided to the arrangement view controller with an explicit
placement.

### Getting view state

[`struct ViewState`](/documentation/UIKit/UIArrangementViewController/ViewState)

The state of a view within an arrangement.

[`@interface UIArrangementViewState : NSObject`](/documentation/UIKit/UIArrangementViewState)

The state of a view within an arrangement.

[`func state(for: UIArrangementViewController.ViewPlacement) -> UIArrangementViewController.ViewState?`](/documentation/UIKit/UIArrangementViewController/state(for:))

Returns the view state for a placement in the arrangement.

[`- (UIArrangementViewState *) stateForPlacement:(UIArrangementViewControllerViewPlacement) placement;`](/documentation/UIKit/UIArrangementViewController/stateForPlacement:)

Returns the arrangement view state for a placement.

## Relationships

### Conforms To

[`Equatable`](/documentation/Swift/Equatable)

[`NSExtensionRequestHandling`](/documentation/Foundation/NSExtensionRequestHandling)

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

[`Sendable`](/documentation/Swift/Sendable)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

[`Hashable`](/documentation/Swift/Hashable)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

[`UIContentContainer`](/documentation/UIKit/UIContentContainer)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`UIStateRestoring`](/documentation/UIKit/UIStateRestoring)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CVarArg`](/documentation/Swift/CVarArg)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

### Inherits From

[`UIViewController`](/documentation/UIKit/UIViewController)

---

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)