---
title: MSMessagesAppPresentationStyle.compact
framework: messages
role: symbol
role_heading: Case
path: messages/msmessagesapppresentationstyle/compact
---

# MSMessagesAppPresentationStyle.compact

The iMessage App is displayed inside the keyboard area.

## Declaration

```swift
case compact
```

## Discussion

Discussion When you use the compact presentation style, the extension’s user interface replaces the keyboard. Because the keyboard is not available, adding text fields or text views to your compact layout is not recommended. If you have a control that requires input from the keyboard (for example, a text field), you must call requestPresentationStyle(_:) to expand the extension as soon as the user selects that control. This allows you to display both the extension’s user interface and the keyboard at the same time. Additionally, do not include horizontally scrolling elements in a compact layout. This includes gesture recognizers for horizontal swipes.

## See Also

### Presentation Styles

- [MSMessagesAppPresentationStyle.expanded](messages/msmessagesapppresentationstyle/expanded.md)
- [MSMessagesAppPresentationStyle.transcript](messages/msmessagesapppresentationstyle/transcript.md)
