【问题标题】:How to make Apple Watch center aligned UI as given in Apple Videos如何使 Apple Watch 中心对齐 UI,如 Apple 视频中所述
【发布时间】:2015-04-14 00:42:57
【问题描述】:

我正在尝试在 Apple Watch 中实现类似于 Apple 在其视频中显示的 UI。

我想在GlanceInterfaceController 以及 Apple Watch 应用程序的常规界面控制器中展示这一点。我尝试使用WKInterfaceGroup 对象对标签(WKInterfaceLabel)和图像(WKInterfaceImage)对象进行分组,但是视图并没有居中对齐。您能否给我一些关于如何使用 Storyboard(界面构建器)实现它的提示。同样在界面生成器中,它不允许我在图像(WKInterfaceImage)对象的顶部放置标签(WKInterfaceLabel)。

预期的用户界面(几乎):

开发的用户界面(使用界面构建器和情节提要):

是不是因为我的布局实现中的一些错误?

提前谢谢你!

【问题讨论】:

标签: ios storyboard interface-builder watchkit apple-watch


【解决方案1】:

您可以通过多种方式做到这一点。

最简单、最快捷的方法之一是将您的元素放在一个组中,并使用该图像作为组背景。

另一种方法是生成带有using something like this example from Apple 内文本的图像。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-02-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多