UIImagePickerController *ii_picker= [[UIImagePickerController alloc] init];
ii_picker.delegate=self;
ii_picker.sourceType=UIImagePickerControllerSourceTypeCamera;
add_photo=NO;
[self presentModalViewController:ii_picker animated:YES];
[ii_picker release];
This used to work fine till I updated to iOS 5 on my iPhone. Something strange...
Problem isn't in the code. It's working in blank project! If I paste it to any place in my project's code, it's crashing. If I change UIImagePickerControllerSourceTypeCamera
to UIImagePickerControllerSourceTypeSavedPhotosAlbum
, it's working in iOS5.
Does anybody know where the problem is?