<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -",
    "tvOS: 17.4.0 -",
    "visionOS: 1.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIMenuDisplayPreferences/maximumNumberOfTitleLines",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIMenuDisplayPreferences(py)maximumNumberOfTitleLines"
  },
  "title" : "maximumNumberOfTitleLines"
}
-->

# maximumNumberOfTitleLines

The number of lines the menu displays for an item’s title or subtitle before it truncates the text.

```
var maximumNumberOfTitleLines: Int { get set }
```

## Discussion

By default, [`UIMenu`](/documentation/UIKit/UIMenu) restricts the number of lines in a menu item’s title or subtitle to create a balance between a compact and expressive display. If you dynamically prepare menu items that might contain more text, set this value to a higher number and use this object as the menu’s [`displayPreferences`](/documentation/UIKit/UIMenu/displayPreferences).

> Note:
> Setting this property has no effect on menus in Mac Catalyst apps.

---

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)