1

我正在使用下面的代码注册以了解屏幕的变化。当我使用 SharedElementTransition 时出现问题。按下屏幕。它不会触发记录的事件。有没有人经历过这个?

版本:react-native-cli:2.0.1 react-native:0.47.1 react-native-navigation:1.1.256

注册事件屏幕:

export const registerScreenVisibilityListener = (store) => {
  new ScreenVisibilityListener({
    willAppear: ({screen}) => console.log(`Screen will disappear ${screen}`),
    didAppear: ({screen}) => console.log(`Screen will disappear ${screen}`),
    willDisappear: ({screen}) => console.log(`Screen will disappear ${screen}`),
    didDisappear: ({screen}) => console.log(`Screen disappeared ${screen}`)
  }).register();
}

推屏:

navigator.push({
    screen: 'Test',
    sharedElements: [`image`],
    animationType: 'slide-horizontal',
    navigatorStyle
});
4

0 回答 0