我正在使用react原生动作单npm进行跨平台动作sheet.In我的项目有一个流程,其中四个动作单将基于onclick一个接一个地打开。
此流程在安卓系统中运行良好,但在ios系统中我无法打开行动单programatically.Any帮助非常感谢
请检查onPress函数
a) openRequestTypeActionSheet
b) openPaymentTypeActionSheet
c) openPaymentTypeActionSheet1
import React, { createRef } from 'react';
import { View, Text, StyleSheet, StatusBar, Image, Dimensions, TouchableWithoutFeedback, Platform } from 'react-native';
import ActionSheet from "react-native-actions-sheet";
const actionSheetRef = createRef();
const actionSheetRef1 = createRef();
const actionSheetRef2 = createRef();
const actionSheetRef5 = createRef();
export default class Map extends React.Component {
openRequestTypeActionSheet = () => {
actionSheetRef2.current?.setModalVisible(false)
setTimeout(() => { actionSheetRef.current?.setModalVisible(true) }, 100);
}
openPaymentTypeActionSheet = () => {
actionSheetRef5.current?.setModalVisible(false)
setTimeout(() => { actionSheetRef2.current?.setModalVisible(true) }, 100);
}
openPaymentTypeActionSheet1 = () => {
actionSheetRef1.current?.setModalVisible(false)
setTimeout(() => { actionSheetRef2.current?.setModalVisible(true) }, 100);
}
}发布于 2021-08-25 12:31:41
您可以使用以下形式使用ExtraOverlayComponent:
<ActionSheet
.....
ExtraOverlayComponent ={exteraactionsheet()}
.....
/>https://stackoverflow.com/questions/66985269
复制相似问题