Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>UIImagePicker consumes more memory from processor.. So you need to solve first this Memory Warning.</p> <p>I got same kind of issue when i was using camera and photo library for Video.</p> <p>After i tricks used and it solved. Here are the tricks</p> <p><strong>Globally define UIImagePickerController and access</strong> </p> <p>And here i have use code to call library</p> <pre><code>-(UIImagePickerController *)getImagePickerController{ if (!imagePickerController) { imagePickerController = [[UIImagePickerController alloc]init]; } return imagePickerController; } </code></pre> <p>After call this UIImagePicker instance to videoPicker</p> <pre><code>videoPicker = [self getImagePickerController]; videoPicker = [[UIImagePickerController alloc] init]; videoPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; videoPicker.delegate = self; videoPicker.allowsEditing = YES; videoPicker.mediaTypes = [NSArray arrayWithObject:(NSString *)kUTTypeMovie]; videoPicker.videoQuality = UIImagePickerControllerQualityTypeHigh; videoPicker.videoMaximumDuration = 30.0; NSArray *sourceTypes = [UIImagePickerController availableMediaTypesForSourceType:videoPicker.sourceType]; if (![sourceTypes containsObject:(NSString *)kUTTypeMovie ]) { NSLog(@"no video"); } else { [self presentModalViewController:videoPicker animated:YES]; } </code></pre> <p>After cancel or select any media dismiss <strong>Picker</strong> only and release. Dont release and dismiss do with <strong>videoPicker</strong>.</p> <pre><code>- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { [picker dismissModalViewControllerAnimated:YES]; } </code></pre> <p>And if already picker instance is there than dont alloc once again.</p>
    singulars
    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.
    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