<!--
{
  "availability" : [
    "iOS: 2.0.0 - 6.0.0",
    "iPadOS: 2.0.0 - 6.0.0",
    "macCatalyst: 13.1.0 - 13.1.0",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIViewController/presentModalViewController:animated:",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIViewController(im)presentModalViewController:animated:"
  },
  "title" : "presentModalViewController:animated:"
}
-->

# presentModalViewController:animated:

Presents a modal view managed by the given view controller to the user.

```
- (void) presentModalViewController:(UIViewController *) modalViewController animated:(BOOL) animated;
```

## Parameters

`modalViewController`

The view controller that manages the modal view.

`animated`

If <doc://com.apple.documentation/documentation/Swift/true>, animates the view as it’s presented; otherwise, does not.

## Discussion

On iPhone and iPod touch devices, the view of `modalViewController` is always presented full screen. On iPad, the presentation depends on the value in the [`modalPresentationStyle`](/documentation/UIKit/UIViewController/modalPresentationStyle) property.

Sets the [`modalViewController`](/documentation/UIKit/UIViewController/modalViewController) property to the specified view controller. Resizes its view and attaches it to the view hierarchy. The view is animated according to the transition style specified in the [`modalTransitionStyle`](/documentation/UIKit/UIViewController/modalTransitionStyle) property of the controller in the `modalViewController` parameter.

---

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)