views:

15

answers:

1

hello all, i have a uibutton to trigger iphone's camera to grab image and i have a uiimageView in same view to show captured image , but it not showing anything after capturing... any solution ?..

A: 

here's my code:

  • (IBAction)grabImage:(id)sender{

UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsImageEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController: picker animated:YES];
[picker release];

}

-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage : (UIImage *)image editingInfo:(NSDictionary *)editingInfo { cameraImageView.image = image; [picker dismissModalViewControllerAnimated:YES];

}

apple
check the frame of the cameraImageView in your actual code.
Alin
Ya now its working fine.. thanks a lot...
apple