我有以下代码启动相机应用程序,用户可以选择“使用照片”。然而什么也没有发生。
if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera] == YES) {
UIImagePickerController *imagePickerController = [[UIImagePickerController alloc]init];
imagePickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
[self presentModalViewController:imagePickerController animated:YES];
}
我怎样才能从中获取 UIimage 并将其保存到相册中。理想情况下,我想将其保存到文档目录并知道如何执行该部分。谢谢!