iOS实现连拍功能详解手机开发

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)selectedImage editingInfo:(NSDictionary *)editingInfo { 
    NSData *data; 
    if ([UIImagePickerController isSourceTypeAvailable: 
        UIImagePickerControllerSourceTypePhotoLibrary])  { 
        // Set source to the Photo Library 
        picker.sourceType =UIImagePickerControllerSourceTypePhotoLibrary; 
        if (selectedImage) { 
            // save image 
        } 
        if (pickerController == picker)  {//这里的条件随便你自己定义了 
            //**主要就是下面这句话,会让你继续回到take camera的页面 
            pickerController.sourceType =    UIImagePickerControllerSourceTypeCamera;  
        } else { 
            [picker dismissModalViewControllerAnimated:YES]; 
        } 
    } 
}

原创文章,作者:奋斗,如若转载,请注明出处:https://blog.ytso.com/tech/app/5249.html

(0)
上一篇 2021年7月16日 23:40
下一篇 2021年7月16日 23:40

相关推荐

发表回复

登录后才能评论