ios - 如何降低拾取器的高度

标签 ios css titanium titanium-alloy picker

我已经创建了一个 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/

相关文章:

AVAudioSession 的 iOS 错误

ios - 在 iOS 应用程序的一个 View 中使用 Unity3D

ios - `weekday` 是否保证在范围 [1 :7]?

html - 直接后果div的sass风格

ios - UITableview 不显示内容/空单元格

javascript - Jquery在具有不同索引的div中显示文本

html - 下拉菜单的高度问题(html 和 css)

java - Titanium Studio 无法在 MacOS 10.10 Yosemite 上运行

javascript - 切勿在 appcelerator 中使用自定义 ListView 进行成像

ios - Titanium 在浏览器窗口中使用完成按钮打开 url