小编Sai*_*aif的帖子

shouldAutorotateToInterfaceOrientation未在iOS 6中调用

我正在使用MGSplitViewController,我shouldAutorotateToInterfaceOrientation用来控制旋转时主视图控制器的大小.

它在iOS 5上运行良好,但在iOS 6(模拟器和iPad)shouldAutorotateToInterfaceOrientation上从未调用过.

这是一个我应该期望在iOS 6的最终版本中修复的错误或者我不知道已经改变的东西吗?

orientation ios ios6

61
推荐指数
8
解决办法
9万
查看次数

shouldAutorotateToInterfaceOrientation在iOS 6中不起作用

In iOS 6 shouldAutorotateToInterfaceOrientation没有用,但它在iOS 5.0或中工作正常5.1.

我应该需要改变什么iOS 6.这是我的代码

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
if([[[SampleApplicationAppDelegate instance].callInfoDictionary valueForKey:IS_CHAT] isEqualToString:NO_RESPONSE])
{
    int nAngle = 0;
    BOOL bRet = NO;

    switch (interfaceOrientation) {
        case UIInterfaceOrientationPortrait:
            nAngle = 90;
            bRet = YES;
            NSLog(@".......Preview = %f %f",_previewCamera.frame.size.width,_previewCamera.frame.size.height);

            _previewCamera.transform = CGAffineTransformMakeRotation(M_PI*1.5);

            NSLog(@"Preview = %f %f",_previewCamera.frame.size.width,_previewCamera.frame.size.height);
            break;

        case UIInterfaceOrientationPortraitUpsideDown:
            nAngle = 270;
            bRet = YES;
            _previewCamera.transform = CGAffineTransformMakeRotation(M_PI_2);
            break;

        case UIInterfaceOrientationLandscapeLeft:
            nAngle = 0;
            bRet = YES;
            //_previewCamera.transform = CGAffineTransformMakeRotation(M_PI*1.5);
            break;

        case UIInterfaceOrientationLandscapeRight:
            nAngle …
Run Code Online (Sandbox Code Playgroud)

xcode orientation screen-orientation ios6

29
推荐指数
2
解决办法
4万
查看次数

活动监视器显示我的CPU使用率超过100%???(iOS)

我的Messenger应用程序使用超过100%的CPU使用率.一个程序如何使用比我更多的CPU?这个百分比是基于什么的?活动监视器的ScreenShot显示更多的CPU使用率

memory xcode cpu-usage activity-monitor ios

9
推荐指数
1
解决办法
2995
查看次数