I'm using react native 55 and react navigation 2.x. I'm trying voice over on IOS and talkback on android. Android app is working fine but IOS application have some delay when another page is opened. Selected VoiceOver box of first page will be there for some time in second page in IOS. It'll disappear after some time. It should go as soon as 2nd screen is loaded. For routing I'm using react navigation.
Page1:
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View, Button } from 'react-native';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
android:
'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
export default class App extends Component {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>Welcome to React Native!</Text>
<Text style={styles.instructions}>To get started, edit App.js</Text>
<Text style={styles.instructions}>{instructions}</Text>
<Button
onPress={() => { this.props.navigation.navigate('InnerPage1'); }}
title="Learn More"
color="#841584"
accessibilityLabel="Learn more about this purple button"
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});
Page2:
import React, { Component } from 'react'
import { Text, View } from 'react-native'
export default class FirstPage extends Component {
render() {
return (
<View>
<Text> textInComponent </Text>
</View>
);
}
}
Navigator Code:
export const StackNavigation = createStackNavigator({
Home: {
screen: App,
navigationOptions: {
title: 'Page1'
}
},
InnerPage1: {
screen: FirstPage,
navigationOptions: {
title: 'Page2'
}
}
});
const Container = createAppContainer(StackNavigation);
export default Container;
Here are the screen shots of the app:
First Screen:
Second Screen:
As you can see in the above screens, selection of first screen is there in the second screen and it is there for 2 or 3 seconds. If any one new the solution or workaround, please let me know.
Thanks in advance.