横向模式在iPhone中拍摄纵向尺寸的照片

时间:2014-04-03 09:35:51

标签: iphone ios5 auto-rotation

当我启动应用程序时,它工作正常。 但是当我将其旋转到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];

    }

问题是什么?我该如何解决?

0 个答案:

没有答案