cxa / MenuItemKit

UIMenuItem with image and closure(block) action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Setter for 'isMenuVisible' was deprecated in iOS 13.0

ruffdrum opened this issue · comments

The use of
controller.isMenuVisible = true
is creating a warning "Setter for 'isMenuVisible' was deprecated in iOS 13.0: Use showMenuFromView:rect: or hideMenuFromView: instead."
If you use
controller.showMenu(from: button, rect: button.bounds)
instead in the "Show More Items..." closure the menu items will not display.

Don't get your point. The latest update is using something like this to avoid warning:

     if #available(iOS 13.0, *) {
        controller.isMenuVisible = true
      } else {
        controller.setMenuVisible(true, animated: true)
      }