Using Expo Go
on iphone
So I am getting out of my mind and can not solve the problem
This is my code
<TouchableOpacity onPress={() => navigation.goBack()}>
<View style={{backgroundColor:"red", borderRadius:20, paddingRight:100, borderWidth:10}}>
<Text>back</Text>
</View>
</TouchableOpacity>
And when I am pressing at the middle nothing happen, only when I am pressing on the border, also when there is no border the touchable is not pressing at all…
**Using the TouchableOpacity in a custom header
any ideas?
Tried to get rid off the View and etc, nothing helps
2
Answers
Found the problem, there was a title with absolute position and 100% width which was over the TouchableOpacity.
I’m a little confused on why your using an inner
<View>
I tried this locally with the below code and the
onPress
seemingly worked as intendedAlso tested with an empty style attribute, pressing
<Text>
still worked