为什么以及如何在react-nativeprogressImage
中使用<ProgressViewIOS/>
组件中的属性?该文档似乎难以理解。任何人都可以在iOS上共享此属性的屏幕截图输出吗?谢谢 !!!
progressImage
是用于进度条的一部分的图像ProgressViewIOS
。
如果为其提供自定义图像,则将progressTintColor
忽略该属性。
图片:
输出:
码:
import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, ProgressViewIOS, Dimensions} from 'react-native';
const screenWidth = Dimensions.get("screen").width;
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<View style={styles.container}>
<ProgressViewIOS
style={{width: screenWidth - 30}}
progress={0.5}
progressViewStyle = 'default'
trackImage={require('./trackImage.png')}
progressImage={require('./progressImage.png')}
/>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
},
});
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句