swift - 呈现多个 WKInterfaceController(在页面底部导航中)会导致 watchOS4 顶部出现额外的黑色空间。

标签 swift watchos xcode9 watchos-4

应用程序在 watchOS4 之前运行良好,但在 watchOS4 中,在 WKInterfaceController 顶部可以看到额外的黑色空间。这种情况只发生在当前的 WKInterfaceController 中,但如果我尝试推送 WKInterfaceController 似乎工作正常。

案例一:

self.presentController(withNames: ["XYZ", "ABC"], contexts: nil)

见下图,标题下方有额外的栏。

enter image description here

案例二:

self.pushController(withName: "XYZ", context: nil)

在 push 方法中工作正常(watchOS4 中没有额外的空间)。

enter image description here

PS:我也试过新的present方法:

self.presentController(withNamesAndContexts: [(name: "XYZ", context: [:] as AnyObject)])

Also if I am trying to present single interface controller then it works perfect, only cause when in I am trying to present multiple interface controllers(in the page).

最佳答案

我们已就该问题与 Apple 联系。 Thay 告诉我们这是 watchOS 中的一个错误,很快就会得到解决。

PS:不要浪费您对这个问题的代码级支持。

关于swift - 呈现多个 WKInterfaceController(在页面底部导航中)会导致 watchOS4 顶部出现额外的黑色空间。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46300866/

相关文章:

ios - XLPagerTabStrip:不尊重状态栏

ios - 如何确保 OBJ 模型以正确的方向显示?

watchkit - watchOS 2 心率传感器

swift - Watchos 应用程序几天后会自动卸载

ios - WKImage 到数据总是返回 nil

ios - Xcode 9.2 升级导致此错误 : "Command/bin/sh failed with exit code 1"

c++ - Xcode 9 macos 部署目标(使用 C++)给出错误

ios - Swift 在 map 上添加注释

swift - 通过下标访问元组

ios - Swift 中的完成处理程序