Skip to content

How to change back button ? Any examples ? #460

@melihmucuk

Description

@melihmucuk

I can't change default back button on iOS. Whats the problem ? I tried renderBackButton, renderLeftButton and backButtonImage props, but didn't change.

<Scene
  key="entry"
  component={Entry}
  title="Title"
  titleStyle={styles.title}
  navigationBarStyle={styles.navBar}
  renderLeftButton={() => this._backButton.bind(this)}
  renderBackButton={() => this._backButton.bind(this)}
  backButtonImage={backButton}/>

var backButton = (<Image source={this.state.backIcon} style={{width: 30, height: 30}} />);

_backButton(){
    return (
      <View style={{paddingHorizontal: 5, paddingVertical: 7}}>
        <TouchableOpacity
          style={{padding: 10}}
          onPress={() => Actions.pop()}>
          <Icon
            name="arrow-left"
            size={20}
            color="#e67e22" />
        </TouchableOpacity>
      </View>);
  }

Version

"dependencies": {
    "react": "^0.14.8",
    "react-native": "^0.22.2",
    "react-native-router-flux": "^3.2.6",
    "react-native-vector-icons": "^1.3.3"
  }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions