Post

Replies

Boosts

Views

Activity

Comment on Present UIMenu
//For the following:  func setupInfoButton() {         if #available(iOS 14.0, *) {             let infoButton = UIButton()             infoButton.showsMenuAsPrimaryAction = true             infoButton.menu = UIMenu(options: .displayInline, children: [])             infoButton.addAction(UIAction { [weak infoButton] (action) in //Would our app state related code goes here? Thanks...                 infoButton?.menu = infoButton?.menu?.replacingChildren([])             },  for: .menuActionTriggered)         }     }
Jun ’21