hi i just put code of fully capture Image From Camera of Photo library just check it out and try to impliment In your Project:-
-(IBAction)actionImage:(id)sender
{
UIActionSheet *option =[[UIActionSheet alloc]initWithTitle:@"Select" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:nil otherButtonTitles:@"Select Photo",@"Take Photo",nil];
option.actionSheetStyle =UIActionSheetStyleDefault;
[option showInView:self.view];
}
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
{
if (actionSheet.tag==2)
{
[self.navigationController popViewControllerAnimated:YES];
}
else
{
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
if(buttonIndex ==0)
{
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary])
{
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentModalViewController:picker animated:YES];
}
}
else if(buttonIndex ==1)
{
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:picker animated:YES];
}
}
}
}
#pragma mark - imagePickerController Delegate
-(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
[self dismissModalViewControllerAnimated:YES];
imgUserImage.image = [info valueForKey:@"UIImagePickerControllerOriginalImage"];
return;
}
NOTE:- DO not forget Include related Framework or delegate. Hope its help's you no need extra coding for this stuff you just simply do with this above method :)