【发布时间】:2013-05-07 04:47:14
【问题描述】:
我正在开发我的应用程序以相应地自定义按钮。但是,一旦我相应地更改了我的按钮,现在它就变得没有反应了。你可以看到我的代码如下。顺便说一句,当我在 iPhone 4 上运行时,这个按钮仍然有效。真是奇怪! 一旦我改变了我的按钮位置,它就可以工作,但它不会在我想要的位置上工作!
float screenSizeHeight=[UIScreen mainScreen].bounds.size.height;
if(screenSizeHeight==568)
[positionButton setFrame:CGRectMake(184,280,77,30)];
if(screenSizeHeight==480)
[positionButton setFrame:CGRectMake(184,240,77,30)];
手提包按钮不起作用!
【问题讨论】:
-
将
bringSubviewToFront用于positionButton。 -
即使我换了位置,还是没有反应!还有 [self.view bringSubviewToFront:positionButton];还是不行
-
你正在改变 x 位置仪式?但两者的宽度相同(仅限 320).. 所以.....你为什么要改变 xPostion
-
我只是在改变 x 位置。
-
请通过屏幕截图查看我更新的问题!
标签: ios xcode uibutton iphone-5