I have a transparent view with a rectangle drawn onto it using CoreGraphics. When the camera launches the custom overlay view is above the shutter animation. What you see is the standard camera shutter with the custom rectangle above it. How do I get it to go in the right place, underneath the shutter animation? I ve looked at other sample code but it s for OS 3.1 and doesn t seem to do anything differently.
Here s my code:
-(IBAction)cameraButton{
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerCameraDeviceRear]){
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
//Add the OverlayView with the custom Rectangle
CGRect overlayFrame = CGRectMake(0.0f, 0.0f, 320.0f, 480.0f);
OverlayView *overlayView = [[OverlayView alloc]initWithFrame:overlayFrame];
picker.cameraOverlayView = overlayView;
[overlayView release];
[self presentModalViewController:picker animated:YES];
[picker release];
}
}