Latest 1.0.2
Homepage https://github.com/CJMaxWell2013/CJImageBrowser
License MIT
Platforms ios 8.0, requires ARC
Dependencies CJProgressHUD, SDWebImage
Authors

a custom image browser for iOS

Installation

Use CocoaPods

pod 'CJImageBrowser', '1.0.1' 
or 
pod 'CJImageBrowser'

Overview

snapshot

这个图片浏览框架经历了两次修改,使其很像今日头条、腾讯新闻、网易新闻的图片浏览框架!
今后我们还会维护和修改他,如果您在使用中有任何bug,请在github上给我留言!

How to use it

If you want to use this image brower in action call back, for example
collectionView:didSelectItemAtIndexPath: method . like this:

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
CJCollectionViewCell *iamgeCell = (CJCollectionViewCell *)[collectionView cellForItemAtIndexPath:indexPath];
NSInteger count = self.imageArray.count;
// 1.封装图片数据
NSMutableArray *photos = [NSMutableArray arrayWithCapacity:count];

for (int i = 0; i < count; i++) {
CJImageInfo *photo = [[CJImageInfo alloc] init];
photo.url = [NSURL URLWithString:[self.imageArray[i] stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceCharacterSet]]]; // 图片路径
if (indexPath.row == i) {
photo.srcImageView = [iamgeCell imageView]; // 来源于哪个UIImageView
}
[photos addObject:photo];
}

// 2.显示相册
CJImageBrowser *browser = [[CJImageBrowser alloc] init];
browser.currentPhotoIndex = indexPath.row; // 弹出相册时显示的第一张图片是?
browser.photos = photos; // 设置所有的图片
[browser show];

}

Release Notes

1.0.1 – a fix SVProgressHud to -CJ for image brower dependence.
1.0.0 – a simple image brower for iOS.

License

MIT

Latest podspec

{
    "name": "CJImageBrowser",
    "version": "1.0.2",
    "summary": "u4e00u4e2au7b80u5355u7684u56feu7247u6d4fu89c8u6846u67b6,u9ad8u4effu4ecau65e5u5934u6761u548cu817eu8bafu65b0u95fbu3001u7f51u6613u65b0u95fbu7b49u76f8u5173u529fu80fd",
    "description": "u4e00u4e2au7b80u5355u7684u56feu7247u6d4fu89c8u6846u67b6,u9ad8u4effu4ecau65e5u5934u6761u548cu817eu8bafu65b0u95fbu3001u7f51u6613u65b0u95fbu7b49u76f8u5173u529fu80fd for iOS,u652fu6301iOS8.0u53cau5176u4ee5u4e0antu4feeu6539u4e86u5f53u4f20u5165u7684u539fu59cbimageViewu4e3anilu7684bugu3002",
    "homepage": "https://github.com/CJMaxWell2013/CJImageBrowser",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "J.Cheng": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/CJMaxWell2013/CJImageBrowser.git",
        "tag": "1.0.2"
    },
    "source_files": "CJImageBrowser/*.{h,m}",
    "resources": "CJImageBrowser/CJImageBrowser.bundle",
    "requires_arc": true,
    "dependencies": {
        "CJProgressHUD": [],
        "SDWebImage": []
    }
}

Pin It on Pinterest

Share This