tsinghan
V2EX  ›  iOS

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

  •  
  •   tsinghan · Jan 2, 2015 · 6112 views
    This topic created in 4176 days ago, the information mentioned may be changed or developed.

    RT, 什么情况下使用?

    2 replies    2015-01-06 14:23:34 +08:00
    icestraw
        1
    icestraw  
       Jan 2, 2015
    第一个是用来添加一条规则的
    第二条是和Update Constrainers相对,前者是在layout规则不变的情况下刷新界面,后者是在改变了界面的情况下刷新layout规则
    pengjay
        2
    pengjay  
       Jan 6, 2015
    constrain to margins ,表示superview有一个contentInset,约束是相对这个inset布局,默认留一个空白间隙,是在iOS8开始才有的选项。不勾选此项就相对superview的bounds布局。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   927 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 21:17 · PVG 05:17 · LAX 14:17 · JFK 17:17
    ♥ Do have faith in what you're doing.