alinz / react-native-tabbar

Tab bar with more freedom
MIT License
265 stars 49 forks source link

How to place tabbar in top of page? #32

Closed susylPearl closed 8 years ago

susylPearl commented 8 years ago

i have made tabbar at the bottom of screen but i need it at top of the screen. Will it be possible?

JerryAWalker commented 8 years ago

yes

susyl13 commented 8 years ago

How can you suggest me ?

JerryAWalker commented 8 years ago

you will have to make changes in libs/bar/dynamic.js so change // show(enable, duration) { const { size } = this.props; // change size from -size to +size const toValue = !!enable? 0 : +size; this._sizeLimit.reset(!!enable? size : 0); Animated.timing(this.value, { duration: duration, toValue }).start(); } //in render() change from // its styled absolute so change bottom to top Rawbar style={[style, { height: size, bottom: this.value }]} to Rawbar style={[style, { height: size, top: this.value }]}

keep me posted :)

susylPearl commented 8 years ago

Thanks a lot. :+1:

alinz commented 8 years ago

closing this ticket.