Q:

How to determine whether an image was taken from the library or from the camera

I want to check via an if statement if an image is picked from the camera roll or is taken by the built in camera.  How can I do this via an if-statement? 
Thanks for your help! 
Code:
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info{

if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {

    toolbar.hidden = NO;
}

if (picker.sourceType == UIImagePickerControllerSourceTypePhotoLibrary) {

    toolbar.hidden = NO;
}

if (picker.sourceType == UIImagePickerControllerSourceTypeSavedPhotosAlbum) {

    toolbar.hidden = NO;
}

else{

    toolbar.hidden = YES;
}

imgView.image = [info objectForKey:@"UIImagePickerControllerEditedImage"];

[self dismissViewControllerAnimated:YES completion:nil];
}

A:

Simply check the sourceType:
if (picker.sourceType == UIImagePickerControllerSourceTypeCamera) {
    //image taken with camera
}
else{
    //image taken from camera roll
}

Do this in your imagePickerController:didFinishPickingMediaWithInfo: method.