• 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.

  • 相关阅读:
    python sys.path.append
    python中的map()函数
    python中的map、filter、reduce函数
    上传文件2.0--drp203
    The import org.apache.commons.fileupload cannot be resolved
    让我会好好学习一阵子的东西
    【JSP】--Error错误页设置,声明式异常--188 drp
    【JSP】--重定向,转发--186 drp
    【JSP】--路径问题--如何去掉../,直接写绝对路径
    主备切换,双机热备,负载均衡,nginx
  • 原文地址:https://www.cnblogs.com/feng9exe/p/7930524.html
Copyright © 2020-2023  润新知