You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I defined an icon button in the renderForeground, hoping to return to the previous page by clicking the icon button, but this icon button did not return to the previous page. You can go back to the previous page if you define the icon button elsewhere. Why the icon button defined in the renderForeground cannot return to the previous page, and why the onPress event is not executed for the icon defined in the renderForeground
render() {
return (
<View style={{flex: 1}}>
<ParallaxScrollView
parallaxHeaderHeight={270}
renderForeground={this.renderForeground}
>
{this.renderContent()}
);
}
// header
renderForeground=() => {
return
<TouchableOpacity onPress={this.goBack}>
<Ionicons name={'ios-arrow-back'} size={26} color={'white'}/>
};
// important: goBack() Did not perform
goBack = () => {
let {navigation} = this.props;
navigation.goBack()
};
The text was updated successfully, but these errors were encountered: