【发布时间】:2021-03-04 08:41:52
【问题描述】:
当将可见模式设置为 false 时,模式会闪烁,尤其是在 <Animated.view> 组件上时,我遇到了问题。我已经尝试了这个 github 问题(https://github.com/react-native-modal/react-native-modal/issues/268)的所有解决方案,但没有人解决我的问题。此问题仅在 IOS 模拟器中发生,但在 android 模拟器中按预期工作。
这是我的模态代码
<Modal
animated
animationIn="fadeIn"
animationOut="fadeOut"
backdropTransitionOutTiming={0}
visible={visible}
transparent
onRequestClose={handleDismiss}>
<View style={styles.overlay}>
{this.renderOutsideTouchable()}
<Animated.View
style={{
...styles.container,
transform: [{translateY: translateY}],
}}
>
{this.renderTitle()}
{this.renderContent()}
{this.renderButton()}
</Animated.View>
</View>
</Modal>
有没有人遇到同样的问题并解决了?
【问题讨论】:
标签: react-native