【发布时间】:2018-11-23 17:28:53
【问题描述】:
我想在 react-native 的 IOS 应用程序中的 TouchableHighlight 中对齐这个选项图标,但是当我实现它时没有使用 textAlignVerticle属性,因为它是 android 唯一的属性。我如何才能获得在 android 和 IOS 中都适用的替代方案?
<TouchableHighlight
style={[{position: 'absolute', bottom: 20, zIndex:999999, right: 155, borderRadius: 25}, (this.state.searchList)? { backgroundColor: 'red' }: {backgroundColor: 'black'}]}
onPress={()=>this.props.navigation.navigate('SearchSetting')}
>
<Icon name="options" style={{height: 50, width: 50, color: 'white', textAlign: 'center', textAlignVertical: 'center'}} />
</TouchableHighlight>
【问题讨论】:
标签: ios react-native