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

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                ## UIButton 文字顯示位置設置 字體的大小設置 字體的顏色設置 注意事項 ~~~ btn.frame = CGRectMake(x, y, width, height); [btn setTitle: @"search" forState: UIControlStateNormal]; //設置按鈕上的自體的大小 //[btn setFont: [UIFont systemFontSize: 14.0]]; //這種可以用來設置字體的大小,但是可能會在將來的SDK版本中去除改方法 //應該使用 btn.titleLabel.font = [UIFont systemFontOfSize: 14.0]; [btn seBackgroundColor: [UIColor blueColor]]; //最后將按鈕加入到指定視圖superView [superView addSubview: btn]; ~~~ ========================================================== ~~~ tvnamelabel=[[UIButton alloc]initWithFrame:CGRectMake(5,5,200,40)]; ~~~ 這樣初始化的button,文字默認顏色是白色的,所有如果背景也是白色的話,是看不到文字的, ~~~ btn.contentHorizontalAlignment=UIControlContentHorizontalAlignmentLeft ;//設置文字位置,現設為居左,默認的是居中 [btn setTitle:@“title”forState:UIControlStateNormal];// 添加文字 ~~~ 有些時候我們想讓UIButton的title居左對齊,我們設置 ~~~ btn.textLabel.textAlignment = UITextAlignmentLeft ~~~ 是沒有作用的,我們需要設置 ~~~ btn.contentHorizontalAlignment = UIControlContentHorizonAlignmentLeft; ~~~ 但是問題又出來,此時文字會緊貼到做邊框,我們可以設置 ~~~ btn.contentEdgeInsets = UIEdgeInsetsMake(0,10, 0, 0); ~~~ 使文字距離做邊框保持10個像素的距離。 ======================================================= 設置UIButton上字體的顏色設置UIButton上字體的顏色,不是用: ~~~ [btn.titleLabel setTextColor:[UIColorblackColor]]; btn.titleLabel.textColor=[UIColor redColor]; ~~~ 而是用: ~~~ [btn setTitleColor:[UIColor blackColor]forState:UIControlStateNormal]; 資源參考:http://blog.csdn.net/chengyingzhilian/article/details/8363855 ~~~
                  <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>

                              哎呀哎呀视频在线观看