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

    • <bdo id='YVjEF'></bdo><ul id='YVjEF'></ul>

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

      我的按钮的 titleLabel 变成了“..."在 iOS10 上

      时间:2023-07-08
    1. <legend id='kFOW3'><style id='kFOW3'><dir id='kFOW3'><q id='kFOW3'></q></dir></style></legend>

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

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

            1. <tfoot id='kFOW3'></tfoot>
                  <tbody id='kFOW3'></tbody>
                本文介绍了我的按钮的 titleLabel 变成了“..."在 iOS10 上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                当我使用 iOS 10 时,某些按钮标签的文本变为...".我在 iOS9 中发现相同的字符串(例如:我是人)使用 48 宽度.在 iOS10 中它使用 48.96 宽度.如何解决?

                When I use iOS 10 some button label's text become "...". I found the same string (e.x:我是人) in iOS9 uses 48 width. In iOS10 it uses 48.96 width. How to fix?

                推荐答案

                你必须使用你的按钮的titleLabel的adjustsFontSizeToFitWidth"属性

                You have to use "adjustsFontSizeToFitWidth" property of titleLabel of your button

                例子:

                  myButton.titleLabel.adjustsFontSizeToFitWidth = YES;
                

                此行会根据按钮的宽度自动调整 myButton 文本的字体大小.

                This line will automatically adjust font size for the text of myButton based on the width of the button.

                使用此链接:将 UIButton 字体大小调整为宽度

                另一种解决方案是通过调整约束来增加按钮的宽度.

                Another solution is to increase the width of the button, by adjusting constraints.

                这篇关于我的按钮的 titleLabel 变成了“..."在 iOS10 上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:UIButtons之间的自动布局相等空间 下一篇:HTTP“内容处置:附件"并在 iOS 网络浏览器上下载文件

                相关文章

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

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

                    <tfoot id='MG3XU'></tfoot><legend id='MG3XU'><style id='MG3XU'><dir id='MG3XU'><q id='MG3XU'></q></dir></style></legend>
                    • <bdo id='MG3XU'></bdo><ul id='MG3XU'></ul>