QMUI_iOS icon indicating copy to clipboard operation
QMUI_iOS copied to clipboard

点击UIBarButtonItem 如何打开QMUIPopupMenuView

Open ByteRax opened this issue 8 years ago • 5 comments

运行环境

  • [x] 设备:模拟器
  • [x] 系统:iOS 11.2
  • [x] Xcode 版本:9.2
  • [x] QMUI iOS 版本:2.3.0

点击UIBarButtonItem 如何打开QMUIPopupMenuView

ByteRax avatar Jan 19 '18 10:01 ByteRax

在你的 UIBarButtonItem 点击事件里打开 QMUIPopupMenuView 就好。

MoLice avatar Jan 19 '18 11:01 MoLice

QMUIPopupMenuView显示需要指定一个view然而、UIBarButtonItem拿不到view

ByteRax avatar Jan 19 '18 11:01 ByteRax

那你的问题应该跟 QMUI 无关,而是“如何获取 UIBarButtonItem 的位置”。

可以自行搜索,例如这个答案应该能解决你的问题:https://stackoverflow.com/questions/14318368/uibarbuttonitem-how-can-i-find-its-frame

MoLice avatar Jan 19 '18 11:01 MoLice

确实无关,不好意思,谢谢您的解答。

ByteRax avatar Jan 19 '18 11:01 ByteRax

不客气

MoLice avatar Jan 19 '18 11:01 MoLice