ios上传图片,图片压缩,相机连拍。

简单的进行调用:
- (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex{

__weak publishInforMationViewController *weakSelf =self;
if (buttonIndex == 0) {

    if (![CommonTool isAllowTakePhoto]) {
        NoPictureViewController *vc = [[NoPictureViewController alloc]init];
        UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:vc];
        [self presentViewController:nav animated:YES completion:^{
        }];
        return;
    }
    ZLCameraViewController *cameraVc = [[ZLCameraViewController alloc] init];
    cameraVc.maxCount = 9 - self.arrImage.count;
    NSMutableArray *arr =[NSMutableArray array];
    // 多选相册+相机多拍 回调
    [cameraVc startCameraOrPhotoFileWithViewController:self complate:^(NSArray *object) {
        // 选择完照片、拍照完回调
        [object enumerateObjectsUsingBlock:^(id asset, NSUInteger idx, BOOL *stop) {
                if ([asset isKindOfClass:[ZLCamera class]]) {
                    [arr  addObject:asset];
                }else{
                    [arr  addObject:asset];
                }
        }];
        for (int i=0; i

}

github_Demo :https://github.com/yuanchuns/YC-ZLPhotoLib-takePhoto

你可能感兴趣的:(图片压缩,相机连拍,ios)