My app uses camera to take a photo.
When I open the camera the second time (after I opened it the first time and closed it),
the app crashes with this message:
*** -[PLCameraPreviewView isKindOfClass:]: message sent to deallocated instance 0x4193380
what is PLCameraPreviewView?
do you know what is happening, I just use the following code to open the camera:
self.imagePicker = [[[UIImagePickerController alloc] init] autorelease];
imagePicker.delegate = self;
imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
imagePicker.allowsEditing = NO;
[self presentModalViewController:imagePicker animated:YES];
The reason is that I have a UIView category which has a method:
+(UIView*)firstResponder;
when I change the name of this method to
+(UIView*)theFirstResponder;
the problem went away.
I guess we should not name the methods in our category similar to the built-in method names of that class.