0

i have a TabBarController in which one tab has an ImageView. Besides, i have a button to display the ImagePicker:

- (IBAction)choosePhoto {
    // Create image picker controller
    UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init];

    // Set source to the camera
    imagePicker.sourceType =  UIImagePickerControllerSourceTypeCamera;

    // Delegate is self
    imagePicker.delegate = self;

    // Allow editing of image ?
    [imagePicker setAllowsEditing:NO];

    // Show image picker
    [tabBarController presentModalViewController:imagePicker animated:NO];

But the problem is that when i press the button in order to launch the ImagePicker i get the message: Received memory warning. Level=1/ Level=2.

I've tried to change the delegate to the View of the tab but it doesn't works neither.

Any idea?

Thanks

jer
  • 20,094
  • 5
  • 45
  • 69
Gerardo
  • 5,800
  • 11
  • 66
  • 94

1 Answers1

0

A memory warning per se is not a problem. The camera needs an awful lot of memory so it is very common that the system generates a memory warning whenever the camera interface is being displayed. Just make sure to free as much memory as possible in reaction to the warning.

Ole Begemann
  • 135,006
  • 31
  • 278
  • 256