当我启动应用程序时,它工作正常。
但是当我将其旋转到landscape
模式时,iPhone上的UIButton
仍会拍摄portrait
帧尺寸的照片。
if (IS_IPHONE)
{
[Arrowbutton setBackgroundImage:[UIImage imageNamed:@"drop-down-icon.png"] forState:UIControlStateNormal];
UIInterfaceOrientation orientation = [UIApplication sharedApplication].statusBarOrientation;
if (UIInterfaceOrientationIsPortrait(orientation))
{
if(IS_IPHONE_5)
{
Arrowbutton.frame = CGRectMake(530.0, 15.0, 19.0, 23.0);
}
else
{
//
Arrowbutton.frame = CGRectMake(260.0, 15.0, 19.0, 23.0);
}
[cell.contentView addSubview:Arrowbutton];
}
else
{
Arrowbutton.frame = CGRectMake(260.0, 15.0, 19.0, 23.0);
}
[cell.contentView addSubview:Arrowbutton];
}
问题是什么?我该如何解决?