【问题标题】:View with constraints changes when run on simulator在模拟器上运行时查看约束变化
【发布时间】:2015-05-18 23:51:49
【问题描述】:

我有一个UISegmentedControl,在一个静态UITableViewCell 中。我在所有 4 个方面都添加了 constraints。我希望segmentedControl 有方角。我在情节提要中设置它看起来像那样,它看起来很好。但是当我在模拟器上运行它时,你可以看到圆润的边缘。 (我没有收到任何警告。)

故事板:(应该是这样的)

约束:

模拟器:

【问题讨论】:

  • 在设备上运行时会发生什么?

标签: ios storyboard nslayoutconstraint


【解决方案1】:

这可能是因为视图的边距。请查看this answer,了解什么是边距以及如何处理边距。

【讨论】:

    猜你喜欢
    • 2019-01-27
    • 1970-01-01
    • 1970-01-01
    • 2023-04-10
    • 2012-06-04
    • 1970-01-01
    • 1970-01-01
    • 2019-10-10
    • 1970-01-01
    相关资源
    最近更新 更多