react-native - IOS水平旋转Y图像
问题描述
我试图在rotateY上使用反应原生动画旋转图像
问题是,在 iOS 中,与 android 相比,它唯一旋转的一半图像可以完美地做到这一点
我附上 android 和 iOS 执行的链接:
ios https://streamable.com/nmqin
安卓https://streamable.com/64p25
animateLogo () {
this.animatedLogo.setValue(0)
Animated.timing(
this.animatedLogo, {
toValue: 1,
duration: 1500,
easing: Easing.linear,
}
).start();
}
render() {
const spin = this.animatedLogo.interpolate({
inputRange: [0,1],
outputRange: ['0deg', '1440deg']
});
return (
<View style={styles.container}>
<Animated.Image
style={[styles.logo,{
width:110,
height:150,
transform: [{ rotateY: spin }]
}]}
source={require('./assets/logo_white1.png')}
/>
</View>)}
我一直在尝试在转换中添加相应的但没有用
解决方案
推荐阅读
- swift - SwiftUI:两个具有相同宽度/高度的按钮
- windows - 带有 UI 的计划任务需要延迟才能正常工作
- aws-sam-cli - 使用 sam deploy ---guided 时出现 Security Constraints Not Satisfied 错误的原因是什么?
- intellij-idea - IntelliJ IDEA 可以选择“当前分支及其远程跟踪分支”吗?
- javascript - 将对象数组按其值推送到另一个数组
- prolog - 如何在prolog中编写具有绝对路径的文件
- javascript - Codeigniter - 将教师仅限于他们所教的科目
- c# - 对列表进行更改导致 DataGridView 显示空白
- rust - 在枚举与结构之间转换
- c# - 如何在 C# 中重用外包装迭代代码?