Awesome Open Source
Awesome Open Source

HXPhotoBrowser

  • Photo browser that simulates progressive loading

  • Based on SDWebImage > 5.0

Language

Objective-C

Example

  • fade in list
 #import "HXUIButton+SDWebImage.h" or #import "HXUIImageView+SDWebImage.h"

 - (void)sd_setFadeImageWithURL:(nullable NSURL *)url;

image

  • style in photoBrowser
typedef NS_ENUM(NSUInteger, HXPhotoLoadType) {
    HXPhotoLoadTypeNormal = 0, //正常样式
    HXPhotoLoadTypeMask, //遮罩层样式
    HXPhotoLoadTypeProgressive //渐进式加载样式
};

typedef NS_ENUM(NSUInteger, HXPhotoProgressType) {
    HXPhotoProgressTypeRing = 0, //圆环网络加载进度
    HXPhotoProgressTypeBar //条状网络加载进度
};

image image image image

Use

HXPhotoBrowserViewController *pb = [HXPhotoBrowserViewController new];
pb.parentVC = self;
pb.photoViewArray = _selectedViewArray.copy;
pb.currentIndex = sender.tag;
pb.urlStrArray = self.urlImgArray;
pb.config.photoLoadType = HXPhotoLoadTypeMask;
pb.config.photoProgressType = HXPhotoProgressTypeRing;
[pb show];

demo中使用的网图时间久了存在着url失效的可能,如果在demo中遇到不显示图片的问题可以换一个图片url,我发现了会及时更新。

License

HXPhotoBrowser is available under the MIT license. See the LICENSE file for more info.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
objective-c (10,905
photo (74
picture (64