---
title: modalPresentationStyle
framework: uikit
role: symbol
role_heading: Instance Property
path: uikit/uiviewcontroller/modalpresentationstyle
---

# modalPresentationStyle

The presentation style for modal view controllers.

## Declaration

```swift
var modalPresentationStyle: UIModalPresentationStyle { get set }
```

## Discussion

Discussion Presentation style defines how the system presents a modal view controller. The system uses this value only in regular-width size classes. In compact-width size classes, some styles take on the behavior of other styles. You can influence this behavior by implementing the adaptivePresentationStyle(for:traitCollection:) method. Presentation style also impacts the content size of a modal view controller. For example, UIModalPresentationStyle.pageSheet uses an explicit size that the system provides. By contrast, UIModalPresentationStyle.formSheet uses the view controller’s preferredContentSize property, which you can set. The default value is UIModalPresentationStyle.automatic. For a list of presentation styles and their compatibility with the various transition styles, see UIModalPresentationStyle.

## See Also

### Presenting a view controller

- [show(_:sender:)](uikit/uiviewcontroller/show(_:sender:).md)
- [showDetailViewController(_:sender:)](uikit/uiviewcontroller/showdetailviewcontroller(_:sender:).md)
- [UIViewController.ShowDetailTargetDidChangeMessage](uikit/uiviewcontroller/showdetailtargetdidchangemessage.md)
- [present(_:animated:completion:)](uikit/uiviewcontroller/present(_:animated:completion:).md)
- [dismiss(animated:completion:)](uikit/uiviewcontroller/dismiss(animated:completion:).md)
- [UIModalPresentationStyle](uikit/uimodalpresentationstyle.md)
- [modalTransitionStyle](uikit/uiviewcontroller/modaltransitionstyle.md)
- [UIModalTransitionStyle](uikit/uimodaltransitionstyle.md)
- [isModalInPresentation](uikit/uiviewcontroller/ismodalinpresentation.md)
- [definesPresentationContext](uikit/uiviewcontroller/definespresentationcontext.md)
- [providesPresentationContextTransitionStyle](uikit/uiviewcontroller/providespresentationcontexttransitionstyle.md)
- [disablesAutomaticKeyboardDismissal](uikit/uiviewcontroller/disablesautomatickeyboarddismissal.md)
- [showDetailTargetDidChangeNotification](uikit/uiviewcontroller/showdetailtargetdidchangenotification.md)
