Home Diary Blog Photo Community Open Source
Setting InitialPage does not work

Reference url: https://github.com/skv-headless/react-native-scrollable-tab-view/issues/750

react-native-scrollable-tab-view@v0.7.4 react-native@0.48.4

  1. open the source file react-native-scrollable-tab-view/index.js

  2. find the code in the method componentDidMount:

this.setTimeout(() => { InteractionManager.runAfterInteractions(() => { if (Platform.OS === 'android') { this.goToPage(this.props.initialPage, false); } }); }, 0);

  1. delete the code about os check

this.setTimeout(() => { InteractionManager.runAfterInteractions(() => { this.goToPage(this.props.initialPage, false); }); }, 0);

reload your app , this problem will be fixed, test on ios 11.0.2