0

iOS7 上的标题栏存在问题:iOS7 工具栏与标题栏及其按钮重叠。这些按钮是可粘贴的,但几乎没有。我在我创建的应用程序上看到了这一点,该应用程序使用 PhoneGap 打包为本机应用程序。

我相信 Sencha 的人会在以后的版本中修复它,但在此期间最好的修复是什么?马马虎虎的解决方案似乎是使用 CSS 将标题栏的内容下推。

感谢您提供更优雅的解决方案。

4

1 回答 1

1

我在此页面中找到了解决方案(hack)

基本上你只需要比较iOS版本是否大于7,如果是,增加工具栏的高度。

这是代码:

应用程序.js

launch: function() {
    // Destroy the #appLoadingIndicator element
    Ext.fly('appLoadingIndicator').destroy();

    // Initialize the main view
    Ext.Viewport.add(Ext.create('StromRechner.view.Viewport'));

    // Adjust toolbar height when running in iOS to fit with new iOS 7 style
    if (Ext.os.is.iOS && Ext.os.version.major >= 7) {
        Ext.select(".x-toolbar").applyStyles("height: 62px; padding-top: 15px;");
    }
},
于 2013-11-11T14:02:38.417 回答