2011-11-16 86 views

回答

0

我已經解決了這個問題,通過旋轉覆蓋視圖如下,tmpCamera.cameraOverlayView.transform = CGAffineTransformRotate(CGAffineTransformIdentity,117.81);希望這節省了一些人的時間:)

0
first you selected only potrait mode in app settting 
then use this function in viewdidLoad 
//Orientation View into LandScape Mode 
    -(void)orientationToLandscape{ 
     CGAffineTransform rotateTransform; 
     switch ([UIApplication sharedApplication].statusBarOrientation) { 
      case UIInterfaceOrientationPortrait: 
       rotateTransform = CGAffineTransformMakeRotation(-90*M_PI/180.0); 
       break; 
      case UIInterfaceOrientationPortraitUpsideDown: 
       rotateTransform = CGAffineTransformMakeRotation(90*M_PI/180.0); 
       break; 

      default: 
       rotateTransform = CGAffineTransformMakeRotation(0); 
       break; 
     } 

     rotateTransform = CGAffineTransformTranslate(rotateTransform, +90.0, +90.0); 
     [self.view setTransform:rotateTransform]; 


    } 
相關問題