获得“使用两阶段旋转动画”用UIImagePickerController警告 [英] Getting "Using two-stage rotation animation" warning with UIImagePickerController

查看:126
本文介绍了获得“使用两阶段旋转动画”用UIImagePickerController警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了简单的代码来测试UIImagePickerController:

I wrote simple code to test UIImagePickerController:

@implementation ProfileEditViewController

- (void)viewDidLoad {
  [super viewDidLoad];

  photoTaker_ = [[UIImagePickerController alloc] init];
  photoTaker_.delegate = self;
  photoTaker_.sourceType = UIImagePickerControllerSourceTypeCamera;
  photoTaker_.showsCameraControls = NO;
}

- (void)viewDidAppear: (BOOL)animated {
  [self presentModalViewController: photoTaker_ animated: NO];
}

@end

我变得奇怪警告如下:


2010-05-20 17:53:13.838 TestProj [2814:307]使用两阶段旋转动画。要使用更平滑的单阶段动画,此应用程序必须删除两阶段方法实现。
2010-05-20 17:53:13.849 TestProj [2814:307]当旋转多个视图控制器或视图控制器而不是窗口代理时,不支持使用两阶段旋转动画

2010-05-20 17:53:13.838 TestProj[2814:307] Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations. 2010-05-20 17:53:13.849 TestProj[2814:307] Using two-stage rotation animation is not supported when rotating more than one view controller or view controllers not the window delegate

知道这是关于什么的吗?非常感谢提前!

Got any idea what this is about? Thanks a lot in advance!

推荐答案

如果您要展示 UIImagePickerController 在另一个 UIViewController 中。因为它不像 UINavigationController 堆栈那样被推送,所以在 UIWindow 级别存在混淆。我不知道警告是否有问题,但要消除警告,您可以执行以下操作:

This message will appear if you are presenting the UIImagePickerController within another UIViewController. Because it isn't pushed like a UINavigationController stack, there is confusion at the UIWindow level. I don't know if the warning is a problem, but to eliminate the warning you can do the following:

// self = a UIViewController  
//  

- (void) showCamera  
{  
    cameraView = [[UIImagePickerController alloc] init];  
    [[[UIApplication sharedApplication] keyWindow] setRootViewController:cameraView];  
    [self presentModalViewController:cameraView animated:NO];  
}   

- (void) removeCamera  
{  
    [[[UIApplication sharedApplication] keyWindow] setRootViewController:self];  
    [self dismissModalViewControllerAnimated:NO];  
    [cameraView release];  
}  

这篇关于获得“使用两阶段旋转动画”用UIImagePickerController警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆