Skip to content

3.1.0

Compare
Choose a tag to compare
@danielsaidi danielsaidi released this 09 Dec 10:03
· 74 commits to master since this release

Thanks to @BinaryDennis, this version adds support for auto dismissing context menus and action sheets when an app is sent to the background.

New stuff:

  • ActionSheet has a new ActionSheet.Configuration that replaces Menu.Configuration. You specify it when you create an action sheet.
  • There is a new ActionSheetPresenterBase base class that you can use when creating custom presenters.
  • ActionSheetStandardPresenter and ActionSheetPopoverPresenter inherits ActionSheetPresenterBase.
  • ActionSheetPopoverPresenter has moved its popover delegate logic to another class and no longer inherits NSObject.
  • There is a new DestructiveItem type that makes it possible to have destructive options in a menu, not just destructive buttons.
  • DestructiveItem is automatically styled by the ActionSheetAppearance base class.
  • DestructiveItem is automatically annotated when it's converted to a context menu item.

Deprecations:

  • Menu.Configuration is deprecated and have no affect anymore.
  • Menu.presentAsActionSheet is deprecated. Use toActionSheet instead, then present it.
  • ActionSheet.HeaderViewConfiguration is renamed to ActionSheet.HeaderConfiguration
  • ActionSheet.headerViewConfiguration is renamed to ActionSheet.headerConfiguration
  • ActionSheetDangerItemCell is renamed to ActionSheetDestructiveItemCell

Breaking changes:

I tried but couldn't avoiding breaking changes, since some protocols had to change. Hopefully, you can easily work around these changes:

  • ActionSheetPresenter no longer has an isDismissable property. Instead, use a .nonDismissable configuration when creating an action sheet.
  • ActionSheetPresenter convenience presenters are now part of ActionSheetPresenterBase no longer open for extension.