https://cmichel.io/how-to-create-a-more-popup-menu-in-react-native/ 我如何从这个例子中调用popupmenu
答案 0 :(得分:1)
假设您的模块中有UIManagerModule.showPopupMenu
,
然后你可以通过UIManager
class
import { UIManager, findNodeHandle } from 'react-native'
UIManager.showPopupMenu(
findNodeHandle(this.state.icon),
this.props.actions,
this.onError,
this.props.onPress
)
通过查找显示here的reference node
的{{1}}来打开它。
它仅适用于 android ,可以遵循here