HJPhotoBrowser iOS 高性能图片浏览器开源项目

我要开发同款
匿名用户2016年12月29日
48阅读
所属分类Objective-C、iOS代码库、图像(Image)
授权协议MIT

作品详情

HJPhotoBrowser是一款iOS高性能图片浏览器,依赖SDWebImage,支持浏览本地图片及网络图片,支持CocoaPods安装。

主要功能

图片浏览

Installation

CocoaPods

pod 'HJPhotoBrowser' # Podfile

代码示例

  - (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath  {        NSInteger count = _dailyModel.picArray.count;        HJPhotoBrowser *browser = [[HJPhotoBrowser alloc] init];        browser.sourceImagesContainerView = collectionView;        browser.imageCount = count;        browser.currentImageIndex = indexPath.row;        browser.delegate = self;        [browser show];  }  #pragma 占位图  -(UIImage *)photoBrowser:(HJPhotoBrowser *)browser placeholderImageForIndex:(NSInteger)index  {        return [UIImage imageNamed:@"error_image"];  }  #pragma 图片的地址  -(NSURL *)photoBrowser:(HJPhotoBrowser *)browser highQualityImageURLForIndex:(NSInteger)index  {        return [NSURL URLWithString:_dailyModel.picArray[index]];  }
查看全文
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论