【问题标题】:appcelerator ios app displays black bar above and below app contentappcelerator ios app在app内容上方和下方显示黑条
【发布时间】:2016-02-19 02:09:36
【问题描述】:

这让我彻底疯了。 我无法让我的应用程序隐藏我 iphone 上的状态栏。

在我的 tiapp.xml 我有

<fullscreen>true</fullscreen>
and
<key>UIStatusBarHidden</key><true/>

在我的 index.xml 中有

<Alloy>
<Window class="container" fullscreen="true">

我的 iphone 屏幕底部的状态栏仍然是空白的。

我想念什么? 这令人沮丧。

【问题讨论】:

    标签: ios appcelerator appcelerator-titanium appcelerator-alloy


    【解决方案1】:

    您在http://s11.postimg.org/3rk17bib7/bottompart.png 中看到的内容不是很清楚,因为该应用程序有黑色背景,但这就是正在发生的事情:

    运行应用程序的 iPhone (6) 缺少启动画面,这会触发 iOS 以信箱模式显示应用程序。所以标签下的黑色空间就是信箱。屏幕顶部也会显示相同的内容。

    【讨论】:

      【解决方案2】:

      终于找到问题了。这很奇怪,但它与 app/assets/iphone 中的图像有关。我之前删除了所有合金默认图像(所有以“默认”开头的图像)。我把合金默认图像放回去,问题就消失了。

      我不知道为什么,但这解决了它。

      【讨论】:

      • my answer,我解释了为什么会解决它。
      【解决方案3】:

      你需要对代码做一些改动,

      在 Tiapp.xml 中

      <fullscreen>false</fullscreen>
      <navbar-hidden>true</navbar-hidden>
      

      在 index.xml 中

      <Window class="container">
          <Label id="label" onClick="doClick">Hello, World</Label>
      </Window>
      

      在 index.tss 中

      ".container": {
         layout: "vertical",
         navBarHidden: true,
         backgroundColor:"white"
      }
      

      http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.Window-property-navBarHidden

      这会使导航栏隐藏在 ios 中。

      【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-06
      • 2018-04-02
      • 2021-10-19
      • 1970-01-01
      • 1970-01-01
      • 2015-03-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多