<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Messages",
  "identifier" : "/documentation/Messages/MSMessagesAppViewController/willTransition(to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Messages"
    ],
    "preciseIdentifier" : "c:objc(cs)MSMessagesAppViewController(im)willTransitionToPresentationStyle:"
  },
  "title" : "willTransition(to:)"
}
-->

# willTransition(to:)

Tells the view controller that the extension is about to transition to a new presentation style.

```
func willTransition(to presentationStyle: MSMessagesAppPresentationStyle)
```

## Parameters

`presentationStyle`

The new presentation style. For a list of possible styles, see [`MSMessagesAppPresentationStyle`](/documentation/Messages/MSMessagesAppPresentationStyle).

## Discussion

Override this method to update your extension’s layout while the extension is transitioning between the [`MSMessagesAppPresentationStyle.compact`](/documentation/Messages/MSMessagesAppPresentationStyle/compact) and [`MSMessagesAppPresentationStyle.expanded`](/documentation/Messages/MSMessagesAppPresentationStyle/expanded) styles. The user can switch between styles by tapping the collapse and expand buttons in the Messages app.  You can also programmatically trigger a transition by calling [`requestPresentationStyle(_:)`](/documentation/Messages/MSMessagesAppViewController/requestPresentationStyle(_:)).

The system doesn’t call this method on a view controller that is presenting a live view in the transcript or input field—in other words, when the view controller’s [`presentationStyle`](/documentation/Messages/MSMessagesAppViewController/presentationStyle) property is set to the [`MSMessagesAppPresentationStyle.transcript`](/documentation/Messages/MSMessagesAppPresentationStyle/transcript) value.

> Note:
> Because the keyboard is not available in the ``doc://com.apple.messages/documentation/Messages/MSMessagesAppPresentationStyle/compact`` style, adding text fields or text views to your compact layout is not recommended.

---

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)