类似于<即刻>应用的图片浏览器效果(支持PNG, JPG, GIF, WebP).
- cocoapod
pod 'MFPictureBrowser'
- 导入
#import <MFPictureBrowser.h>
- 初始化并设置代理
MFPictureBrowser *brower = [[MFPictureBrowser alloc] init];
brower.delegate = self;
- 展示
//展示图片
[brower showImageFromView:(fromView) picturesCount:(picturesCount) currentPictureIndex:(currentPictureIndex)];
实现代理方法
- (FLAnimatedImageView *)pictureView:(MFPictureBrowser *)pictureBrowser imageViewAtIndex:(NSInteger)index {
...
}
- (id<MFPictureModelProtocol>)pictureBrowser:(MFPictureBrowser *)pictureBrowser pictureModelAtIndex:(NSInteger)index {
...
}
具体使用方式参见 Demo