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

    1. <legend id='uOSyX'><style id='uOSyX'><dir id='uOSyX'><q id='uOSyX'></q></dir></style></legend>

      • <bdo id='uOSyX'></bdo><ul id='uOSyX'></ul>
    2. <small id='uOSyX'></small><noframes id='uOSyX'>

    3. 水平 UIButton 中的垂直文本

      Vertical text in a Horizontal UIButton(水平 UIButton 中的垂直文本)
    4. <small id='0X7uK'></small><noframes id='0X7uK'>

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

        <legend id='0X7uK'><style id='0X7uK'><dir id='0X7uK'><q id='0X7uK'></q></dir></style></legend>
        <tfoot id='0X7uK'></tfoot>

                <tbody id='0X7uK'></tbody>

              • 本文介绍了水平 UIButton 中的垂直文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我在纵向应用程序中使用垂直 UIButton(只是一个宽度为 60 和高度为 160 的普通按钮)

                I'm using a vertical UIButton in a portrait app (Just a normal button that is of width 60 and Height 160)

                我想将标签 Vetically 放在按钮下方,而不是放在按钮上方.

                I want to put the label Vetically down the button instead of across it.

                当我使用以下代码旋转标签时

                When I use the following code to rotate the label

                    [workPackageButton.titleLabel setTransform:CGAffineTransformMakeRotation(M_PI / 2)];
                

                它会旋转标签,但长度似乎受到原始宽度的限制,所以我在中间得到了 ... 缩写.有没有简单的方法解决这个问题?

                It rotates the label but the length seems to be constrained by the original width, so I get the ... abreviation in the middle. Is there an easy way round this?

                推荐答案

                您可以在按钮上添加标签并旋转标签,如下所示:

                You can add a Label on button and rotate the label as below:

                UILabel *lbl= [[UILabel alloc] initWithFrame:CGRectMake(button.frame.size.width*.3, button.frame.size.height*.5, button.frame.size.width,button.frame.size.height)];
                lbl.transform = CGAffineTransformMakeRotation(M_PI / 2);
                lbl.textColor =[UIColor whiteColor];
                lbl.backgroundColor =[UIColor clearColor];
                [button addSubview:lbl];
                

                这篇关于水平 UIButton 中的垂直文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                UIButton title text color(UIButton 标题文本颜色)
                Stretch background image for UIButton(为 UIButton 拉伸背景图像)
                Using Tint color on UIImageView(在 UIImageView 上使用 Tint 颜色)
                How can I change UIButton title color?(如何更改 UIButton 标题颜色?)
                iPhone UIButton - image position(iPhone UIButton - 图像位置)
                UIButton remove all target-actions(UIButton 删除所有目标动作)

              • <tfoot id='tBItr'></tfoot>

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

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

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

                            <tbody id='tBItr'></tbody>