IT虾米网

iOS实现连拍功能

qq123 2018年06月24日 手机开发 1132 0
- (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]; 
        } 
    } 
}

评论关闭
IT虾米网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!