Skip to content

v4.5.2

Choose a tag to compare

@LeoNatan LeoNatan released this 26 Jul 01:38
· 32 commits to master since this release
e03a7d6

This is a very big release, with many improvements.

Mac iPad

  • Many layout improvements to the popup bar and how it handles the countless variations of bar buttons
  • Fixes to complex RTL layouts
  • Catalyst and iPad are now much better supported, with layouts that were previously not possible
    • The LNPopupItem.leadingBarButtonItems and LNPopupItem.trailingBarButtonItems APIs have been undeprecated and it is now possible to place leading and trailing buttons on any bar style
    • The LNPopupItem.barButtonItems will continue to place items at the trailing edge; however, if you were relying on the previous behaviur, where LNPopupItem.leadingBarButtonItems would be placed in the trailing items on floating bars, this is no longer the case
  • If too many buttons are placed in a bar item and there is no space for the image and/or titles, the popup bar will hide elements to make space available for buttons
    • This is especially important in freely resizeable environments, such as iPads, Mac windows and … future iPhone devices
    • Use the new LNPopupBar.effectiveContentSize API to inspect the effect size of the popup bar content and reduce the number of buttons depending on available space
  • Escape key now closes the popup in most scene environments
    • Some more complex scenes cannot be supported since the popup might be opened in a controller that is not in the responder chain
    • In these cases, route the keys yourself or make the view controller the first responder
  • Catalyst now has first-class support and a new example project
  • New APIs introduced to better support split view controllers on large devices
    • UISplitViewController.popupBarAvoidsPrimaryColumn API has been introduced to better supprot environments where a popup is presented with the split view controller as the popup presentation controller
      • When enabled, the system will attempt to avoid the primary split and move the popup bar out of the way
      • The popup will continue to open over the entire split view controller’s bounds
      • Enabed by default
    • UIViewController.popupOpensOverSplitViewController API has been introduced to better support environments where a popup is presented by a popup presentation controller that is part of a split view controller scene
      • When enabled, the system will open the popup over the entire split view controller’s view bounds rather than only within the specific split
      • This is enabled by default on Catalyst but disabled on iOS (to preserve previous behavior)
      • The popup bar will remain within the containing view controller’s bounds
    • The two new APIs can result in a similar looking behavior from the user’s standpoint, but offer different benefits and tradeoffs; consider first presenting your popup bar over the split view controller