zoukankan      html  css  js  c++  java
  • UI布局术语

    horizontal, vertical

    top, left, bottom, right

    UIEdgeInsets

    margin与padding

    Interpreting Values

    Values in Auto Layout are always in points. However, the exact meaning of these measurements can vary depending on the attributes involved and the view’s layout direction. 

     

    Auto Layout Attributes

    Value

    Notes

    image: ../Art/ALGuide_Height.pdfHeight

    image: ../Art/ALGuide_Width.pdfWidth

    The size of the view.

    These attributes can be assigned constant values or combined with other Height and Width attributes. These values cannot be negative.

    image: ../Art/ALGuide_TopToSuper.pdfTop

    image: ../Art/ALGuide_BottomToSuper.pdfBottom

    image: ../Art/ALGuide_AlignMiddle.pdfBaseline

    The values increase as you move down the screen.

    These attributes can be combined only with Center Y, Top, Bottom, and Baseline attributes.

    image: ../Art/ALGuide_LeftToSuper.pdfLeading

    image: ../Art/ALGuide_RightToSuper.pdfTrailing

    The values increase as you move towards the trailing edge. For a left-to-right layout directions, the values increase as you move to the right. For a right-to-left layout direction, the values increase as you move left.

    These attributes can be combined only with Leading, Trailing, or Center X attributes.

    image: ../Art/ALGuide_LeftToSuper.pdfLeft

    image: ../Art/ALGuide_RightToSuper.pdfRight

    The values increase as you move to the right.

    These attributes can be combined only with Left, Right, and Center X attributes.

    Avoid using Left and Right attributes. Use Leading and Trailing instead. This allows the layout to adapt to the view’s reading direction.

    By default the reading direction is determined based on the current language set by the user. However, you can override this where necessary. In iOS, set the semanticContentAttribute property on the view holding the constraint (the nearest common ancestor of all views affected by the constraint) to specify whether the content’s layout should be flipped when switching between left-to-right and right-to-left languages. 

    image: ../Art/ALGuide_AlignCenter.pdfCenter X

    image: ../Art/ALGuide_AlignMiddle.pdfCenter Y

    The interpretation is based on the other attribute in the equation.

    Center X can be combined with Center X, Leading, Trailing, Right, and Left attributes.

    Center Y can be combined with Center Y, Top, Bottom, and Baseline attributes.

  • 相关阅读:
    CSAcademy Or Problem
    BZOJ 4516 [Sdoi2016] 生成魔咒
    SPOJ7258 SUBLEX
    SPOJ1812 LCS2
    SPOJ1811 LCS
    SPOJ8222 NSUBSTR
    洛谷3804 【模板】后缀自动机
    SPOJ287 NETADMIN
    SPOJ1693 COCONUTS
    BZOJ5329 SDOI2018 战略游戏
  • 原文地址:https://www.cnblogs.com/feng9exe/p/7930524.html
Copyright © 2011-2022 走看看