D
D
Dima Yarmolchuk2012-12-03 23:34:20
iOS
Dima Yarmolchuk, 2012-12-03 23:34:20

Are you using UIImagePickerController in your application?

Hello!
I am writing my own application in which I use UIImagePickerController, when I try to take a photo, I get a low memory warning and very often the application crashes, maybe someone has encountered such a problem, how can I get around or fix it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
IgorKamenev, 2012-12-04
@IgorKamenev

Well, it crashes, apparently, because the behavior for such an event is incorrectly processed.
In general, people advise doing something wrong:
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
[imageView setImage:image];
[self dismissModalViewControllerAnimated:YES];
like this:
UIImage *image = [info objectForKey:UIImagePickerControllerOriginalImage];
[self dismissModalViewControllerAnimated:YES];
[imageView setImage:image];
BUT!
It is still worth doing so that the application does not crash with a low memory warning.
(There is a button in the simulator that emulates this event)

E
Egor Merkushev, 2012-12-04
@egormerkushev

Please provide your device model.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question