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.

  • 相关阅读:
    40 修改了机器名,portal重装后,还需要做什么?
    39 路径分析小练习
    38 空间查询小练习
    面向对象一些概念简述
    Js函数基本介绍
    JS中的变量和数据类型
    js基础语法
    Css样式优先级
    对响应式布局的理解和认知
    关于Flex布局
  • 原文地址:https://www.cnblogs.com/feng9exe/p/7930524.html
Copyright © 2011-2022 走看看