<bdo id='IWzMP'></bdo><ul id='IWzMP'></ul>

  • <small id='IWzMP'></small><noframes id='IWzMP'>

      <i id='IWzMP'><tr id='IWzMP'><dt id='IWzMP'><q id='IWzMP'><span id='IWzMP'><b id='IWzMP'><form id='IWzMP'><ins id='IWzMP'></ins><ul id='IWzMP'></ul><sub id='IWzMP'></sub></form><legend id='IWzMP'></legend><bdo id='IWzMP'><pre id='IWzMP'><center id='IWzMP'></center></pre></bdo></b><th id='IWzMP'></th></span></q></dt></tr></i><div id='IWzMP'><tfoot id='IWzMP'></tfoot><dl id='IWzMP'><fieldset id='IWzMP'></fieldset></dl></div>
      <legend id='IWzMP'><style id='IWzMP'><dir id='IWzMP'><q id='IWzMP'></q></dir></style></legend>

        <tfoot id='IWzMP'></tfoot>

      1. iOS - 设置 UIButton 背景颜色只为角落着色

        时间:2023-07-07
          <i id='wS75k'><tr id='wS75k'><dt id='wS75k'><q id='wS75k'><span id='wS75k'><b id='wS75k'><form id='wS75k'><ins id='wS75k'></ins><ul id='wS75k'></ul><sub id='wS75k'></sub></form><legend id='wS75k'></legend><bdo id='wS75k'><pre id='wS75k'><center id='wS75k'></center></pre></bdo></b><th id='wS75k'></th></span></q></dt></tr></i><div id='wS75k'><tfoot id='wS75k'></tfoot><dl id='wS75k'><fieldset id='wS75k'></fieldset></dl></div>
        • <small id='wS75k'></small><noframes id='wS75k'>

          <tfoot id='wS75k'></tfoot>
          <legend id='wS75k'><style id='wS75k'><dir id='wS75k'><q id='wS75k'></q></dir></style></legend>

                  <tbody id='wS75k'></tbody>
                • <bdo id='wS75k'></bdo><ul id='wS75k'></ul>
                  本文介绍了iOS - 设置 UIButton 背景颜色只为角落着色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I'm trying to customize my button by changing their colors, but when I use either:

                  self.loginButton.layer.backgroundColor = [UIColor colorWithRed:0.0 green:157.0/255.0 blue:223.0/255.0 alpha:1.0].CGColor;
                  

                  or

                  self.loginButton.backgroundColor = [UIColor colorWithRed:0.0 green:157.0/255.0 blue:223.0/255.0 alpha:1.0];
                  

                  All I get is this result:

                  What I want to do is change the white color to blue, any idea what I'm doing wrong?

                  解决方案

                  You're using a round rect button which is pretty ugly, and pretty hard to customise.

                  You can create a custom type button and use a background image, or create a custom type button and round the corners and set the background colour of the layer yourself.

                  If you want to get really fancy there is a nice tutorial here which can give you any-sized gradient type buttons using layers, no image files required.

                  这篇关于iOS - 设置 UIButton 背景颜色只为角落着色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:按下时 UIButton 不突出显示 下一篇:iOS 无法更改 UIButton 的框架

                  相关文章

                  <legend id='oi08y'><style id='oi08y'><dir id='oi08y'><q id='oi08y'></q></dir></style></legend>
                • <i id='oi08y'><tr id='oi08y'><dt id='oi08y'><q id='oi08y'><span id='oi08y'><b id='oi08y'><form id='oi08y'><ins id='oi08y'></ins><ul id='oi08y'></ul><sub id='oi08y'></sub></form><legend id='oi08y'></legend><bdo id='oi08y'><pre id='oi08y'><center id='oi08y'></center></pre></bdo></b><th id='oi08y'></th></span></q></dt></tr></i><div id='oi08y'><tfoot id='oi08y'></tfoot><dl id='oi08y'><fieldset id='oi08y'></fieldset></dl></div>
                    <bdo id='oi08y'></bdo><ul id='oi08y'></ul>

                    1. <tfoot id='oi08y'></tfoot>

                      <small id='oi08y'></small><noframes id='oi08y'>