【问题标题】:WatchKit adding margin to LabelWatchKit 为标签添加边距
【发布时间】:2015-04-08 14:41:50
【问题描述】:

有没有办法在 Watchkit 中为 WKInterfaceLabel 添加边距/填充? 使用 UIEdgeInsets 不起作用。

【问题讨论】:

  • WatchKit 不使用 WKInterfaceLabel 吗?

标签: ios watchkit apple-watch wkinterfacelabel


【解决方案1】:

您应该创建一个 WKInterfaceGroup 并在组内添加 WKInterfaceLabel。您可以使用该组管理边距/填充。

【讨论】:

  • 谢谢!像魅力一样工作!
【解决方案2】:

在您的故事板中,将您的 WKInterfaceLabel 添加到 WKInterfaceGroup。然后在组的属性中将插图设置为自定义。您可以更改组的顶部、左侧、底部和右侧插图。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-04-16
    • 2022-01-27
    • 2021-09-06
    • 1970-01-01
    • 2020-06-27
    • 2021-04-29
    • 2020-01-05
    相关资源
    最近更新 更多