Tag: ios7 uiimagepickercontroller

在iPhone中使用iOS 7打开相机时,横向模式中的方向问题

我有一个只在横向模式的应用程序。 在我的应用程序,我从我的意见之一打开相机。 它适用于我的iPad,但在iPhone上它崩溃。 它在iOS 6中运行良好,但该应用程序崩溃的iOS 7和只为iPhone。 以下是我的代码。 if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { ipc=[[UIImagePickerController alloc] init ]; ipc.delegate=self; ipc.sourceType=UIImagePickerControllerSourceTypeCamera; [self presentViewController:ipc animated:YES completion:nil]; } else { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Desc" message:@"Camera capture is not supported in this device" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil]; [alert show]; [alert release]; } 如何解决这个问题? 当我select从相机捕捉时,它崩溃。 它不会从上面的代码崩溃,但之后崩溃与下面的错误。 我得到这个错误: 由于未捕获的exception“UIApplicationInvalidInterfaceOrientation”,终止应用程序,原因:“支持的方向与应用程序没有共同的方向,并且shouldAutorotate返回YES 而我的应用程序崩溃。 我在这个视图上的定位代码。 -(BOOL)shouldAutorotate { […]

在iOS 7中使用相机时,应用程序因内存压力而终止

当我使用UIImagePickerController Camera捕捉一些图像时, 由于内存压力 ,我面临着错误的应用程序终止 。 我先收到内存警告,然后突然应用程序崩溃。 这个问题是在iOS 7中,特别是在iOS 6中,它工作正常。 有人知道为什么这个内存问题发生在使用相机的iOS 7中。 注:我试图最大限度地减lessRAM的使用,因为它也可能是这个内存压力的原因。 但仍然受到警告。