【发布时间】:2013-05-06 18:07:35
【问题描述】:
我正在开发我的应用程序以针对 iphone 5 进行自定义。我有按钮并希望它进行相应的自定义。
我已经通过拖放放置了我的按钮并放置在它应该在的位置。现在我想相应地更改位置。
有可能吗?如果是,请告诉我如何。由于我正在尝试在下面更改按钮的位置,但它不起作用 在头文件中
@property (nonatomic, strong) IBOutlet UIButton *opponentUsernameButton;
在实现文件中:
- (void)viewDidLoad {
screenSizeHeight=[UIScreen mainScreen].bounds.size.height;
if(screenSizeHeight==568)
mybuttonOutlet.frame= CGRect(40, 80,125,150);
if(screenSizeHeight==480)
mybuttonOutlet.frame= CGRect(40, 80,85,150);
}
【问题讨论】:
标签: ios xcode uibutton iphone-5