gpt4 book ai didi

iphone - 控制台 UIImagePickerController 中的两阶段旋转动画警报

转载 作者:行者123 更新时间:2023-12-03 20:16:50 25 4
gpt4 key购买 nike

在我的 UIViewController 类中,我创建了一个如下所示的 UIImagePickerController :

-(BOOL)startCameraPickerFromViewController{

if (![UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
return NO;
UIImagePickerController* picker = [[UIImagePickerController alloc] init];

picker.sourceType = UIImagePickerControllerSourceTypeCamera;

picker.allowsEditing = NO ;
picker.delegate = appDelegate.uiImagePickerDelegate;

// Picker is displayed asynchronously.


[self presentModalViewController:picker animated:NO];
return YES;
}

当我调用我的函数时,我得到:

Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations.

我在 Apple 网站上的 UIViewController 类引用中读到,我尝试使用旧的方法来使用旋转。但在我的 UIViewController 中,我从来没有写过:

– willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration:

– willAnimateFirstHalfOfRotationToInterfaceOrientation:duration:

方法。

我试图覆盖

willAnimateRotationToInterfaceOrientation:duration:

但这是同样的问题。

我认为问题来自 UIImagePickerController。有解决办法吗?

最佳答案

这是因为您正在将 UIImagePickerController 推送到另一个 UIViewController 中。请参阅这个答案:Getting "Using two-stage rotation animation" warning with UIImagePickerController

关于iphone - 控制台 UIImagePickerController 中的两阶段旋转动画警报,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3131301/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com