Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more detail information on TabBar #1287

Merged
merged 1 commit into from
Oct 14, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion docs/OTHER_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,44 @@ Lastly when calling the Modal pass the props defined in the component, for examp

When the Modal is pressed it will set hide to true and return an empty view.

## Tabbar
## TabBar
Every tab has its own navigation bar. However, if you do not set its parent `<Scene tabs={true} />` with `hideNavBar={true}`, the tabs' navigation bar will be overrided by their parent.

Customizing `TabBar`:

```javascript
let style = StyleSheet.create({
tabBarStyle: {
borderTopWidth : .5,
borderColor : '#b7b7b7',
backgroundColor: 'white',
opacity : 1
}
});

// in your render method
<Scene key="myTabBar" tabs={true} hideNavBar tabBarStyle={style.tabBarStyle}>
</Scene>

```

Refresh a particular `Scene` when a `Tab` is pressed:

```javascript
<Scene key="myTabBar" tabs={true} hideNavBar tabBarStyle={style.tabBarStyle}>
<Scene
key="myTab"
title="My Tab"
icon={MyTabIcon}
onPress={()=> {
Actions.myTab_1({type: ActionConst.REFRESH});
}}
>
<Scene key="myTab_1" component={MyTabComponent} hideNavBar/>
</Scene>
</Scene>
```


## Custom nav bar for individual scene or even different state of scene (new feature):
Your scene `component` class could implement _static_ renderNavigationBar(props) method that could return different navbar depending from component props
Expand Down