を反応させネイティブv0.49を反応させて、私は他のページに移動するときにカスタムトランジションを実装しようとしています。 私がやろうとしていることだけでシーン2からscene3の1つのシーンの移行を作ることです。すべてのアプリではありません。 この例では、私はちょうど1画面分、私はそのように行うならば、それはすべてのアプリのために影響しますので、すべてのアプリを作りたい、それは私が探しているものではないですので、それはすべてのWebのためだ見つけました。何か案が?は、私が使用しているネイティブのナビゲーションカスタムアニメーションの移行
class SceneOne extends Component {
render() {
return (
<View>
<Text>{'Scene One'}</Text>
</View>
)
}
}
class SceneTwo extends Component {
render() {
return (
<View>
<Text>{'Scene Two'}</Text>
</View>
)
}
}
let AppScenes = {
SceneOne: {
screen: SceneOne
},
SceneTwo: {
screen: SceneTwo
},
SceneThree: {
screen: SceneTwo
},
}
let MyTransition = (index, position) => {
const inputRange = [index - 1, index, index + 1];
const opacity = position.interpolate({
inputRange,
outputRange: [.8, 1, 1],
});
const scaleY = position.interpolate({
inputRange,
outputRange: ([0.8, 1, 1]),
});
return {
opacity,
transform: [
{scaleY}
]
};
};
let TransitionConfiguration =() => {
return {
// Define scene interpolation, eq. custom transition
screenInterpolator: (sceneProps) => {
const {position, scene} = sceneProps;
const {index} = scene;
return MyTransition(index, position);
}
}
};
class App extends Component {
return (
<View>
<AppNavigator />
</View>
)
}
どのナビゲーションライブラリを使用していますか? – Dyo
はhttps://reactnavigation.orgあなたがtransitionerを実装し、https://reactnavigation.org/docs/views/transitioner –
このライブラリでuがそれを使用する方法を具体的な例を持っていますか?どのようにトランスミッタの作業 – Dyo