Latest 2.0.0
Homepage https://github.com/chenteng85912/CTCustomAlbum
License MIT
Platforms ios 8.0, requires ARC
Frameworks Photos, AVFoundation
Authors

CTCustomAlbum CTONEPhoto

pod ‘CTCustomAlbum’

一句代码调用自定义相册,多选照片

    #调用方式一:block
    [CTCustomAlbum showCustomAlbumWithBlock:^(NSArray<UIImage *> *imagesArray) {

    }];

    #调用方式二:代理 self 应当遵守 CTSendPhotosProtocol 协议
    [CTCustomAlbum showCustomAlbumWithDelegate:self];

    #pragma mark CTSendPhotosProtocol
    - (void)sendImageArray:(NSArray <UIImage *> *)imgArray{
    }

一句代码调用系统相册、相机,获取图片或者视频

    #调用方式一:block
    相机
    [CTONEPhoto openCamera:NO autoSave:YES photoComplete:^(UIImage *image, NSString *imageName) {

    }];

    照片或视频
    [CTONEPhoto openAlbum:CTShowAlbumImageAndVideoModel enableEdit:NO photoComplete:^(UIImage *image, NSString *imageName) {

    } videoComplete:^(NSString *videoPath, NSString *videoName, UIImage *videoShotImage) {

    }];

    #调用方式二:代理 self 应当遵守 CTONEPhotoDelegate 协议

    相机
    [CTONEPhoto openCameraWithDelegate:self autoSave:YES enableEdit:NO];

    照片
    [CTONEPhoto openAlbum:CTShowAlbumImageModel withDelegate:self enableEdit:NO];

    视频
    [CTONEPhoto openAlbum:CTShowAlbumVideoModel withDelegate:self enableEdit:NO];

    照片 + 视频
    [CTONEPhoto openAlbum:CTShowAlbumImageAndVideoModel withDelegate:self enableEdit:NO];

    #pragma mark CTONEPhotoDelegate
    - (void)sendOnePhoto:(UIImage *)image
           withImageName:(NSString *)imageName{
    }
    - (void)sendVideoPath:(NSString *)videoPath
                videoName:(NSString *)videoName
           videoShotImage:(UIImage *)videoShotImage{
    }

Latest podspec

{
    "name": "CTCustomAlbum",
    "version": "2.0.0",
    "summary": "CustomAlbum make with Photos.kit",
    "homepage": "https://github.com/chenteng85912/CTCustomAlbum",
    "license": "MIT",
    "authors": {
        "u9648u817e": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/chenteng85912/CTCustomAlbum.git",
        "tag": "2.0.0"
    },
    "requires_arc": true,
    "frameworks": [
        "Photos",
        "AVFoundation"
    ],
    "subspecs": [
        {
            "name": "CTOnePhoto",
            "source_files": "CTCustomAlbum/CTOnePhoto/*.{h,m}"
        },
        {
            "name": "CTCustomAlbum",
            "source_files": "CTCustomAlbum/CTCustomAlbum/**/*.{h,m}",
            "resources": "CTCustomAlbum/CTCustomAlbum/Icon/*.{png,pdf}",
            "dependencies": {
                "CTCustomAlbum/CTOnePhoto": []
            }
        }
    ]
}

Pin It on Pinterest

Share This