Determine when a UIMenuController is dismissed?

后端 未结 4 1135
执笔经年
执笔经年 2021-02-01 06:55

Is there a way to determine when a UIMenuController has been dismissed? I have a (non-editable) text area I\'m highlighting when the menu is brought up, and I\'d like to un-high

4条回答
  •  无人及你
    2021-02-01 07:40

    Swift 5

    NotificationCenter.default.addObserver(
            self,
            selector: #selector(willHideMenu),
            name: UIMenuController.willHideMenuNotification,
            object: nil)
    

提交回复
热议问题