1. <strong id="7actg"></strong>
    2. <table id="7actg"></table>

    3. <address id="7actg"></address>
      <address id="7actg"></address>
      1. <object id="7actg"><tt id="7actg"></tt></object>

        SDAutoLayoutiOS 自動布局庫

        聯(lián)合創(chuàng)作 · 2023-09-26 20:11

        SDAutoLayout(一行代碼搞定自動布局?。?nbsp;

        github地址 https://github.com/gsdios/SDAutoLayout

         

        SDAutoLayout使用者開發(fā)的部分app截圖 http://www.jianshu.com/p/9bc04d3effb8

         

        QQ交流群:497140713  519489682(新開)

        ☆☆ SDAutoLayout 基礎(chǔ)版視頻教程:http://www.letv.com/ptv/vplay/24038772.html ☆☆

        ☆☆ SDAutoLayout 進階版視頻教程:http://www.letv.com/ptv/vplay/24381390.html ☆☆

        ☆☆ SDAutoLayout 原理簡介視頻教程:http://www.iqiyi.com/w_19rt0tec4p.html ☆☆

         

        一行代碼搞定自動布局!

        摒棄復(fù)雜累贅的約束,利用運行時Runtime在合適的時機布局視圖。

        SDAutoLayout 部分demo展示

         

         

        0.用法示例

        /* 用法一 */
        _view.sd_layout
        .leftSpaceToView(self.view, 10)
        .topSpaceToView(self.view, 80)
        .heightIs(130)
        .widthRatioToView(self.view, 0.4);  
        
        /* 用法二 (一行代碼搞定,其實用法一也是一行代碼) */
        _view.sd_layout.leftSpaceToView(self.view, 10).topSpaceToView(self.view,80).heightIs(130).widthRatioToView(self.view, 0.4);

        1.用法簡析

        1.1 > leftSpaceToView(self.view, 10)

        方法名中帶有“SpaceToView”的方法表示到某個參照view的間距,需要傳遞2個參數(shù):(UIView)參照view 和 (CGFloat)間距數(shù)值

        1.2 > widthRatioToView(self.view, 1)

        方法名中帶有“RatioToView”的方法表示view的寬度或者高度等屬性相對于參照view的對應(yīng)屬性值的比例,需要傳遞2個參數(shù):(UIView)參照view 和 (CGFloat)倍數(shù)

        1.3 > topEqualToView(view)

        方法名中帶有“EqualToView”的方法表示view的某一屬性等于參照view的對應(yīng)的屬性值,需要傳遞1個參數(shù):(UIView)參照view

        1.4 > widthIs(100)

        方法名中帶有“Is”的方法表示view的某一屬性值等于參數(shù)數(shù)值,需要傳遞1個參數(shù):(CGFloat)數(shù)值

        PS

        /* 如果您需要布局錯誤LOG信息提示請打開此宏 */

        //#define SDAutoLayoutIssueLog

         

        瀏覽 32
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        評論
        圖片
        表情
        推薦
        點贊
        評論
        收藏
        分享

        手機掃一掃分享

        編輯 分享
        舉報
        1. <strong id="7actg"></strong>
        2. <table id="7actg"></table>

        3. <address id="7actg"></address>
          <address id="7actg"></address>
          1. <object id="7actg"><tt id="7actg"></tt></object>
            少妇久久久久久被弄到高潮 | 北条麻妃最爽的一次 | 温柔少妇的高潮呻吟 | 免费看男男gay啪啪的软件 | 成人女人看A片免费视频古代 | 一级特黄老太婆片免费看 | 北条麻妃办公室性爱 | 王鸥大尺度做爰未删减 | www.yw尤物 | 污视频在线观看视频 |