Latest 0.6.2
Homepage https://github.com/GodzzZZZ/MFPictureBrowser
License MIT
Platforms ios 9.0, requires ARC
Dependencies YYWebImage, YYImage/WebP, MFCategory
Frameworks UIKit, Foundation
Authors

类似于<即刻>应用的图片浏览器效果(支持PNG, JPG, GIF, WebP)
参考:ESPictureBrowser, 提交了 PR, 但原作者可能不维护了, 所以我重新写了一下, 并修改了其中一些 bug.

效果图

MFPictureBrowserMFPictureBrowserMFPictureBrowserMFPictureBrowser

集成方式

  • 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

Latest podspec

{
    "name": "MFPictureBrowser",
    "version": "0.6.2",
    "summary": "Elegant Picture Browser",
    "homepage": "https://github.com/GodzzZZZ/MFPictureBrowser",
    "license": "MIT",
    "authors": {
        "GodzzZZZ": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/GodzzZZZ/MFPictureBrowser.git",
        "tag": "0.6.2"
    },
    "source_files": [
        "Classes",
        "MFPictureBrowserDemo/MFPictureBrowserDemo/MFPictureBrowser/*.{h,m}"
    ],
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "requires_arc": true,
    "dependencies": {
        "YYWebImage": [],
        "YYImage/WebP": [],
        "MFCategory": []
    }
}

Pin It on Pinterest

Share This