Latest 1.0.5
Homepage https://github.com/xicaiZhou/ZXCImagePickerController
License MIT
Platforms ios 8.0, requires ARC
Frameworks UIKit, Photos
Authors

自定义相机、自定义相册、图片选择器

还在使用UIImagePickerController吗?还在填坑吗?那么新手福利来了。教你如何编写属于自己的ImagePickerController。
目前,ZXCImagePickerController版本为1.0.5,2.0版本正在拼命加载中。

集成方法

1.ZXCImagePickerController文件夹拖入自己的工程。
2.使用cocoaPod快速集成。请在你的podfile中加上pod ‘ZXCImagePickerController’,’~> 1.0.5’。然后pod update更新本地库!

使用方法

    #import "ZXCImagePickerController.h"   //头文件
    
    ZXCImagePickerController *pickerVC = [[ZXCImagePickerController alloc] init];
    pickerVC.delegate = self; //遵循ZXCImagePickerControllerDelegate
    //ZXCImagePickerTypeWithAlbum相册模式 ZXCImagePickerTypeWithCamera相机模式
    pickerVC.Type = ZXCImagePickerTypeWithAlbum;
    [self presentViewController:pickerVC animated:YES completion:nil];

代理回调方法

     @protocol ZXCImagePickerControllerDelegate <NSObject>
     -(void)ZXCImagePickerWithPhoto:(UIImage *)image;
     @end

集成注意事项
1.获取权限

    <key>NSCameraUsageDescription</key>
    <string>App需要您的同意,才能访问相机</string>
    <key>NSPhotoLibraryAddUsageDescription</key>
    <string>App需要您的同意,添加照片</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>App需要您的同意,访问相册</string>

2.隐藏状态栏

View controller-based status bar appearance 设置为NO

代码中出现不懂的或者bug请联系我,我的工作邮箱(zhouxicaijob
@163.com),欢迎大神指导!最后,有喜欢iOS成长路的同学,请关注哦!

Latest podspec

{
    "name": "ZXCImagePickerController",
    "version": "1.0.5",
    "summary": "u81eau5b9au4e49u76f8u518cu3001u81eau5b9au4e49u76f8u673au3001u81eau5b9au4e49u56feu7247u9009u62e9u5668",
    "description": "u53eau9700u8981u56dbu884cu4ee3u7801uff0cu5373u53efu5b8cu6210uff01u629bu5f03UIImagePickerControlleruff01",
    "homepage": "https://github.com/xicaiZhou/ZXCImagePickerController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "ZXC": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/xicaiZhou/ZXCImagePickerController.git",
        "tag": "v1.0.5"
    },
    "resources": "ZXCImagePickerController/*.{png,bundle}",
    "source_files": "ZXCImagePickerController/*.{h,m}",
    "requires_arc": true,
    "frameworks": [
        "UIKit",
        "Photos"
    ]
}

Pin It on Pinterest

Share This