Xcode 4.5 iOS 6.0 simulator orientation not working

前端 未结 2 1316
面向向阳花
面向向阳花 2021-01-15 18:39

I have updated my Xcode to 4.5 , I have implemented the orientation methods as below

  -(BOOL)shouldAutorotate{

    return YES;

  }

-(NSUInteger)supported         


        
2条回答
  •  一个人的身影
    2021-01-15 19:06

    Apple has deprecated shouldautorate method from ios6 use these methods instead

    - (BOOL)shouldAutorotate NS_AVAILABLE_IOS(6_0);
    - (NSUInteger)supportedInterfaceOrientations NS_AVAILABLE_IOS(6_0);
    // Returns interface orientation masks.
    - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation NS_AVAILABLE_IOS(6_0);
    

提交回复
热议问题