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

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

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

        UIButton 改变位置

        UIButton Changing Position(UIButton 改变位置)
      1. <i id='Nf06L'><tr id='Nf06L'><dt id='Nf06L'><q id='Nf06L'><span id='Nf06L'><b id='Nf06L'><form id='Nf06L'><ins id='Nf06L'></ins><ul id='Nf06L'></ul><sub id='Nf06L'></sub></form><legend id='Nf06L'></legend><bdo id='Nf06L'><pre id='Nf06L'><center id='Nf06L'></center></pre></bdo></b><th id='Nf06L'></th></span></q></dt></tr></i><div id='Nf06L'><tfoot id='Nf06L'></tfoot><dl id='Nf06L'><fieldset id='Nf06L'></fieldset></dl></div>

          <tfoot id='Nf06L'></tfoot>

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

              <tbody id='Nf06L'></tbody>
                <bdo id='Nf06L'></bdo><ul id='Nf06L'></ul>

                  <legend id='Nf06L'><style id='Nf06L'><dir id='Nf06L'><q id='Nf06L'></q></dir></style></legend>
                • 本文介绍了UIButton 改变位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我在 IB 中设置了一个按钮.我有一个 IBOutlet 设置和链接到它的屏幕对象.有没有办法以编程方式更改按钮的位置和/或大小?我知道您可以更改标题和一些内容,但我不知道如何更改它的位置或大小.

                  I have a button set up in IB. I have an IBOutlet set up and the onscreen object linked to it. Is there a way to programmatically change that buttons position and/or size? I know you can change the title and some things but I don't see how to change it's position or size.

                  现在我想相应地改变它的位置.是否可以?如果是,请告诉我如何,因为我试图在以下代码中更改按钮的位置,但它在头文件中不起作用.

                  Now I would like to change the position of it accordingly. Is it possible? If yes, please let me know how, since I am trying to change the position of my button in the following code, but it does not work in the header file.

                  @property (nonatomic, strong) IBOutlet UIButton *mybuttonOutlet;
                  

                  在实现文件中:

                  -(void)viewDidLoad {
                  
                  
                      screenSizeHeight=[UIScreen mainScreen].bounds.size.height;
                  
                  
                  if(screenSizeHeight==568)
                  
                      mybuttonOutlet.frame= CGRect(38, 464 ,157,25);
                  
                  
                  if(screenSizeHeight==480)
                  
                      mybuttonOutlet.frame= CGRect(38, 364 ,157,25);
                  
                  }
                  

                  推荐答案

                  从 IB 或 storyboard 的按钮中移除 Use Autolayout.

                  Remove Use Autolayout from the button in IB or storyboard.

                  这篇关于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='IywkQ'></tfoot>

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

                        1. <small id='IywkQ'></small><noframes id='IywkQ'>