Note that there are some explanatory texts on larger screens.

plurals
  1. POrecieved memory warning and crash the app when capture more than 4 images?
    primarykey
    data
    text
    <p>In my app I need to upload 6 images to a server. I capture the image then upload it and then go to the next one and do the same.</p> <p>When I reach the 5th image and after receiving 3 or 4 memory warning the app crashes</p> <p>Here is the code of the image picker</p> <pre><code>-(void) TakePhotoWithCamera { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { picker1 = [[UIImagePickerController alloc] init]; picker1.sourceType = UIImagePickerControllerSourceTypeCamera; picker1.allowsEditing = YES; picker1.delegate = self; [self presentViewController:picker1 animated:YES completion:nil]; } } </code></pre> <p>Here is the method when finishing the capture</p> <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { UIImage * img = [info objectForKey:@"UIImagePickerControllerOriginalImage"]; [picker dismissViewControllerAnimated:YES completion:nil]; UIButton * tappedBtn = (UIButton *) [self.horizontalScrollView viewWithTag:chosenImgBtnTag]; [tappedBtn setImage:img forState:UIControlStateNormal]; [self useImage:img]; // this method upload the image to the server info = nil; } </code></pre> <p>here is the method of the setImage</p> <pre><code> - (void) useImage:(UIImage *) image { currentImageToUpload = image; [self showLoadingIndicatorOnImages]; [[CarAdsManager sharedInstance] uploadImage:image WithDelegate:self]; } </code></pre> <p>so please any help in this matter ?</p>
    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.
 

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