UIViewController
在为 iPhone 和 iPad输入 a 后,我正在尝试实现以编程方式拍摄 X 数量照片的功能。我查看了UIImagePickerController
但我不想展示相机控件并让用户点击一个按钮来只拍摄一张照片。有没有办法在输入a后捕获X数量的照片UIViewController
并最终存储所有照片以供将来参考?
编辑:
-(void)viewDidAppear:(BOOL)animated
{
// Create image picker controller
picker = [[UIImagePickerController alloc] init];
if([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera])
{
[picker setSourceType:UIImagePickerControllerSourceTypeCamera];
}
else
{
[picker setSourceType:UIImagePickerControllerSourceTypePhotoLibrary];
}
// Set source to the camera
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
// Delegate is self
picker.delegate = self;
// Allow editing of image ?
picker.allowsEditing = NO;
//picker.showsCameraControls = NO;
// Show image picker
[picker animated:YES completion:nil];
}