Closed ha-family closed 4 years ago
i've got some weird problem, can't find any relevant issue on google. error occurs when i selected the Icon.TabBarItem
error messge
and when change Icon.TabBarItem to TabBarIOS.Item then it works fine.
part of my code below
var Nav = { attr: { tintColor: '#fff', barTintColor: '#fff', titleTextColor:'#666'}, home: { icon: { title: '首頁', iconName: 'ios-home-outline', selectedIconName:'ios-home'}, index: 'HOME' , name: '中古汽車首頁'}, buy: { icon: { title: '買車', iconName: 'ios-car', selectedIconName:'ios-car'}, index: 'BUY_CAR' , name: '買車'}, sell: { icon: { title: '賣車', iconName: 'ios-pricetags-outline', selectedIconName:'ios-pricetags'}, index: 'SELL_CAR' , name: '賣車'}, blog: { icon: { title: '車訊', iconName: 'ios-bookmarks-outline', selectedIconName:'ios-bookmarks'}, index: 'CAR_BLOG' , name: '汽車百科'}, personal: { icon: { title: '我的', iconName: 'ios-person-outline', selectedIconName:'ios-person'}, index: 'MY' , name: '我的'} }; <TabBarIOS tintColor="#EF5350"> <Icon.TabBarItem title={Nav.home.icon.title} iconSize={28} iconName={Nav.home.icon.iconName} selectedIconName={Nav.home.icon.selectedIconName} selected={this.state.selectedTab === Nav.home.index} onPress={() => { if (this.state.selectedTab !== Nav.home.index) { this.setState({ selectedTab: Nav.home.index, active: Nav.home.index, }); } else if (this.state.selectedTab === Nav.home.index) { //this.refs.homeRef.popToTop(); } }}> { (this.state.active == Nav.home.index) && this._renderHome() } </Icon.TabBarItem> <Icon.TabBarItem title={Nav.buy.icon.title} iconSize={28} iconName={Nav.buy.icon.iconName} selectedIconName={Nav.buy.icon.selectedIconName} selected={this.state.selectedTab === Nav.buy.index} onPress={() => { if (this.state.selectedTab !== Nav.buy.index) { this.setState({ selectedTab: Nav.buy.index, active: Nav.buy.index }); } else if (this.state.selectedTab === Nav.buy.index) { //this.refs.buyRef.popToTop(); } }}> { (this.state.active == Nav.buy.index) && this._renderBuy() } </Icon.TabBarItem> </TabBarIOS>
does anyone have the same question?
Closing this issue due to inactivity.
i've got some weird problem, can't find any relevant issue on google. error occurs when i selected the Icon.TabBarItem
error messge
and when change Icon.TabBarItem to TabBarIOS.Item then it works fine.
part of my code below
does anyone have the same question?