我已经创建了一个 Picker,但是我无法降低 picker 的高度。 height属性我也试过了还是没用。
我的代码:
<View class="pageContainer">
<Picker id="langPicker">
<PickerRow title="Select a Language"/>
<PickerRow title="English"/>
<PickerRow title="French"/>
<PickerRow title="Spanish"/>
</Picker>
<Button class="button" onClick="saveLang" dataTransform="transformFunction">Proceed</Button>
</View>
风格
"#langPicker": {
width: '90%',
top: '25dp',
height: '50dp'
}
如何降低选择器的高度?有什么建议
最佳答案
来自docs :
"On iOS, by default, the size of the picker, including its background, is fixed at the same size as the iPhone keyboard to respect the iOS Human Interface Guidelines. The size of the picker should not be modified."
因此,即使您以某种方式设法破解了 iOS 上选择器的高度,当您尝试提交时,它很可能会被应用商店拒绝。
解决方法是仅当用户在 View 上按下某些内容时才显示选择器。
关于ios - 如何降低拾取器的高度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26718700/