<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??一站式輕松地調用各大LLM模型接口,支持GPT4、智譜、豆包、星火、月之暗面及文生圖、文生視頻 廣告
                # 布局 ????`UIView`有三個比較重要的布局屬性:`frame`,`bounds`和`center`,`CALayer`對應地叫做`frame`,`bounds`和`position`。為了能清楚區分,圖層用了“position”,視圖用了“center”,但是他們都代表同樣的值。 ????`frame`代表了圖層的外部坐標(也就是在父圖層上占據的空間),`bounds`是內部坐標({0, 0}通常是圖層的左上角),`center`和`position`都代表了相對于父圖層`anchorPoint`所在的位置。`anchorPoint`的屬性將會在后續介紹到,現在把它想成圖層的中心點就好了。圖3.1顯示了這些屬性是如何相互依賴的。 ![](https://box.kancloud.cn/2015-12-24_567bc1eda6c62.png) 圖3.1?`UIView`和`CALayer`的坐標系 ????視圖的`frame`,`bounds`和`center`屬性僅僅是*存取方法*,當操縱視圖的`frame`,實際上是在改變位于視圖下方`CALayer`的`frame`,不能夠獨立于圖層之外改變視圖的`frame`。 ????對于視圖或者圖層來說,`frame`并不是一個非常清晰的屬性,它其實是一個虛擬屬性,是根據`bounds`,`position`和`transform`計算而來,所以當其中任何一個值發生改變,frame都會變化。相反,改變frame的值同樣會影響到他們當中的值 ????記住當對圖層做變換的時候,比如旋轉或者縮放,`frame`實際上代表了覆蓋在圖層旋轉之后的整個軸對齊的矩形區域,也就是說`frame`的寬高可能和`bounds`的寬高不再一致了(圖3.2) ![](https://box.kancloud.cn/2015-12-24_567bc1edc7cb0.png) 圖3.2 旋轉一個視圖或者圖層之后的`frame`屬性
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看