Ojbective C实现连拍功效

发布时间:2019-05-13  栏目:LINUX  评论:0 Comments

- (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];
        }
    }
}
- (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];
        }
    }
}
//该片段来自于http://outofmemory.cn

留下评论

网站地图xml地图