应用程序在 watchOS4 之前运行良好,但在 watchOS4 中,在 WKInterfaceController 顶部可以看到额外的黑色空间。这种情况只发生在当前的 WKInterfaceController 中,但如果我尝试推送 WKInterfaceController 似乎工作正常。
案例一:
self.presentController(withNames: ["XYZ", "ABC"], contexts: nil)
见下图,标题下方有额外的栏。
案例二:
self.pushController(withName: "XYZ", context: nil)
在 push 方法中工作正常(watchOS4 中没有额外的空间)。
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/