---
title: "setViewController:forPlacement:animated:"
framework: uikit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.1+, iPadOS 27.1+, Mac Catalyst 27.1+, tvOS 27.1+, visionOS 27.1+]
path: "uikit/uiarrangementviewcontroller/setviewcontroller:forplacement:animated:"
---

# setViewController:forPlacement:animated:

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

## Declaration

```occ
- (void) setViewController:(UIViewController *) viewController forPlacement:(UIArrangementViewControllerViewPlacement) placement animated:(BOOL) animated;
```

## Parameters

- `viewController`: The view controller in the arrangement.
- `placement`: The placement of the view controller in the arrangement.
- `animated`: Whether to animate the view controller transition.

## See Also

### Managing arrangement view controllers

- [UIArrangementViewControllerViewPlacement](uikit/uiarrangementviewcontrollerviewplacement.md)
- [viewControllerForPlacement:](uikit/uiarrangementviewcontroller/viewcontrollerforplacement:.md)
- [setViewController:forPlacement:](uikit/uiarrangementviewcontroller/setviewcontroller:forplacement:.md)
- [placementForViewController:](uikit/uiarrangementviewcontroller/placementforviewcontroller:.md)
