您使用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
拍摄一张照片后dissapear,这是你会触发这个动作,并通过调用
[thePicker dismissModalViewControllerAnimated: NO];
http://stackoverflow.com/从屏幕上删除它,在上面介绍,该模式的情况下问题/ 74113/access-the-camera-with-iphone-sdk – 2009-11-17 19:53:26
我无法理解,为什么你不能只使用UIImagePicker?制作照片的标准控制。 – Morion 2009-11-17 19:53:57