我Switch
在我的应用程序中有这个,在 iPhone 上它显示正确,无论开关是打开还是关闭,都有一个白色的拇指。但是,在网络上,当开关打开时,它是这种蓝色,在我的应用程序中没有定义。我无法弄清楚如何覆盖它。
<Switch
trackColor={{ false: colours.darkGrey, true: colours.primary }}
ios_backgroundColor={colours.darkGrey}
thumbColor={colours.white}
onValueChange={toggleSwitch}
value={notificationEnabled}
style={styles.switch}
/>
开关switch
样式:
switch: {
transform: [{ scaleX: 0.7 }, { scaleY: 0.7 }],
},
我不太担心形状不一样,但颜色应该匹配。