What impact does simulated metrics have?

后端 未结 3 1360
小蘑菇
小蘑菇 2020-12-01 15:58

When using .xib files what impact on your code/app does changing simulated metrics have? Or is it just for your benefit as a preview tool?

3条回答
  •  不知归路
    2020-12-01 16:37

    Watch WWDC 2015 Session 407 Implementing UI Designs in Interface Builder, they talked about Simulated Metrics

    Inferred

    Now, right now they are all saying inferred. Inferred just basically means use the context around me. We know we are inside a tab bar controller, we know that we're inside a nav controller so interface builder knows which bar to show.

    Simulated Metrics

    All of these metrics do not affect your actual application at runtime with one exception and that's the size simulated metric.

    The size simulated metric will actually change the size of your view controller but generally you're going to put it into a view controller hierarchy which will resize it, but it's also helpful if you are creating free form view controllers, for example, and want to set your own size.

提交回复
热议问题