Note that there are some explanatory texts on larger screens.

plurals
  1. POUIImagePickerController Low Memory crash at ios7 on iPad Mini
    primarykey
    data
    text
    <p>My app works fine on all the devices and ios versions but when it comes to ipad mini, on iOS7 when i alloc:init the UIImagePickerController and display. After getting image the app suddenly give low memory warning and crash. Here is my code of capturing image.</p> <pre><code>if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { UIImagePickerController *imagePickerController; if ([UIUtilityClass isCurrentVersionIsIOS7OrGreater]) { UIImagePickerController* imagePickerController = [[UIImagePickerController alloc] init]; [imagePickerController setDelegate:self]; imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; imagePickerController.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage,nil]; imagePickerController.allowsEditing=NO; CGFloat scaleFactor=1.3f; switch ([UIApplication sharedApplication].statusBarOrientation) { case UIInterfaceOrientationLandscapeLeft: imagePickerController.cameraViewTransform = CGAffineTransformScale(CGAffineTransformMakeRotation(M_PI * 90 / 180.0), scaleFactor, scaleFactor); break; case UIInterfaceOrientationLandscapeRight: imagePickerController.cameraViewTransform = CGAffineTransformScale(CGAffineTransformMakeRotation(M_PI * -90 / 180.0), scaleFactor, scaleFactor); break; case UIInterfaceOrientationPortraitUpsideDown: imagePickerController.cameraViewTransform = CGAffineTransformMakeRotation(M_PI * 180 / 180.0); break; default: break; } } else { imagePickerController = [[NonRotatingUIImagePickerController alloc] init]; imagePickerController.delegate = self; imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera; imagePickerController.mediaTypes = [NSArray arrayWithObjects:(NSString *)kUTTypeImage,nil]; imagePickerController.allowsEditing = YES; } popoverController = [[UIPopoverController alloc] initWithContentViewController:imagePickerController]; popoverController.delegate=self; [popoverController presentPopoverFromRect:CGRectMake(626,142,120,135) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES]; [imagePickerController release]; newMedia = YES; } </code></pre> <p>After that i capture the image using following code.</p> <pre><code> -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { [popoverController dismissPopoverAnimated:true]; [popoverController.delegate popoverControllerDidDismissPopover:popoverController]; UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage]; int orientation=image.imageOrientation; image=[image imageToFitSize:PIC_SIZE method:MGImageResizeCrop]; switch (orientation) { case UIImageOrientationUp: // do nothing break; case UIImageOrientationDown: image=[image imageRotatedByDegrees:180.0]; break; case UIImageOrientationLeft: image=[image imageRotatedByDegrees:90.0]; image=[image imageRotatedByDegrees:180]; break; //2 case UIImageOrientationRight: image=[image imageRotatedByDegrees:-90.0]; image=[image imageRotatedByDegrees:180]; break; default: break; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload