你用
UIImagePickerController
直接:
UIImagePickerController *thePicker = [[UIImagePickerController alloc] init];
thePicker.delegate = thePickerDelegate;
thePicker.sourceType = UIImagePickerControllerSourceTypeCamera;
//Here you would present thePicker modally, and release it after this
//It will be deallocated when you remove it from screen
[anotherViewController presentModalViewController: thePicker animated:NO];
[thePicker release];
在
thePickerDelegate
,实施
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo;
这个
image
UIImagePickerController
要在拍摄一张照片后消失,您可以在此处触发此操作,并在上面的模式示例中通过调用
[thePicker dismissModalViewControllerAnimated: NO];