ZCamera是一款仿微信的相机和图片选择控件.
To run the example project, clone the repo, and run pod install
from the Example directory first.
引入头文件
#import "ZCameraViewManager.h"
打开遮罩选择图库
ZCameraViewManager *camera = [[ZCameraViewManager alloc] init];
camera.delegate = self;
[camera show];
直接打开图库
ZCameraViewManager *camera = [[ZCameraViewManager alloc] init];
camera.delegate = self;
[camera goToPhotoLibrary];
直接打开相机
ZCameraViewManager *camera = [[ZCameraViewManager alloc] init];
camera.delegate = self;
[camera goToCameraView];
###可选参数
是否多选, 默认 yes
@property (nonatomic, assign) BOOL multiple;
多选图片最大值
@property (nonatomic, assign) NSInteger maximum;
多选图片时初始值
@property (nonatomic, assign) NSInteger threshold;
是否允许编辑, 单选情况下才生效
@property (nonatomic, assign) BOOL allowsEditing;
##ZCameraViewDelegate
相机不可用时调用
- (void)didCameraUnavailable;
图库不可用时调用
- (void)didPhotoLibraryUnavailable;
取消选择图片时调用
- (void)didDismissViewController;
选取一张拍摄后的照片后调用
- (void)didSendPhotoWidthImage:(UIImage *)image;
从图库中选择N 张图片后调用
- (void)didSendPhotoWithImageArray:(NSArray *)imageArry;
ZCamera is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "ZCamera"
zhuayi, [email protected]
ZCamera is available under the MIT license. See the LICENSE file for more info.