---
title: "adaptivePresentationStyle(for:)"
framework: uikit
role: symbol
role_heading: Instance Method
path: "uikit/uiadaptivepresentationcontrollerdelegate/adaptivepresentationstyle(for:)"
---

# adaptivePresentationStyle(for:)

Asks the delegate for the new presentation style to use.

## Declaration

```swift
optional func adaptivePresentationStyle(for controller: UIPresentationController) -> UIModalPresentationStyle
```

## Parameters

- `controller`: The presentation controller that is managing the size change. Use this object to retrieve the view controllers involved in the presentation.

## Return Value

Return Value The new presentation style, which must be UIModalPresentationStyle.fullScreen, UIModalPresentationStyle.overFullScreen, or UIModalPresentationStyle.none.

## Discussion

Discussion In iOS 8.3 and later, use the adaptivePresentationStyle(for:traitCollection:) method to handle all trait changes instead of this method. If you do not implement that method, you can use this method to change the presentation style when transitioning to a horizontally compact environment. If you do not implement this method or if you return an invalid style, the current presentation controller returns its preferred default style.

## See Also

### Adapting the presentation style

- [adaptivePresentationStyle(for:traitCollection:)](uikit/uiadaptivepresentationcontrollerdelegate/adaptivepresentationstyle(for:traitcollection:).md)
