V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
tsinghan
V2EX  ›  iOS

在设置 autolayout 时候 constrain to margins 和 Update Frames 这两项是什么意思?

  •  
  •   tsinghan · 2015-01-02 15:24:11 +08:00 · 5341 次点击
    这是一个创建于 3395 天前的主题,其中的信息可能已经有所发展或是发生改变。

    RT, 什么情况下使用?

    2 条回复    2015-01-06 14:23:34 +08:00
    icestraw
        1
    icestraw  
       2015-01-02 15:34:15 +08:00
    第一个是用来添加一条规则的
    第二条是和Update Constrainers相对,前者是在layout规则不变的情况下刷新界面,后者是在改变了界面的情况下刷新layout规则
    pengjay
        2
    pengjay  
       2015-01-06 14:23:34 +08:00
    constrain to margins ,表示superview有一个contentInset,约束是相对这个inset布局,默认留一个空白间隙,是在iOS8开始才有的选项。不勾选此项就相对superview的bounds布局。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2554 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 01:24 · PVG 09:24 · LAX 18:24 · JFK 21:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.