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.

  • 相关阅读:
    git基础使用小记
    MYSQL 安装&配置
    NGINX 安装&配置
    PHP编译安装
    linux基本命令操作
    css清除浮动的8种方法以及优缺点
    简单概括下浏览器事件模型,如何获得资源dom节点
    HTML5新增的表单元素有哪些?
    css 引入的方式有哪些, link和@import的区别是什么
    git与svn的区别
  • 原文地址:https://www.cnblogs.com/feng9exe/p/7930524.html
Copyright © 2011-2022 走看看