Latest 0.1.6
Homepage https://github.com/MrDML/DMLPhotoBrowser
License MIT
Platforms ios 8.0
Dependencies FLAnimatedImage, SDWebImage
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements&&demonstration

Demo

Installation

DMLPhotoBrowser is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'DMLPhotoBrowser'

Use

注意此框架依赖 FLAnimatedImage和SDWebImage,下面是具体如何使用

本地/相册图片浏览

 
    NSMutableArray *photoItems = [NSMutableArray array];
    int i = 0;
    for (UIImage *image in self.images) {
        UIImageView *imageViewSource = self.bgview.subviews[i];
        DMLPhotoItem *item = [[DMLPhotoItem alloc] initWithSourceView:imageViewSource image:image];
        [photoItems addObject:item];
        i ++;
    }
    DMLPhotoBrowser *Browser = [[DMLPhotoBrowser alloc] initWithPhotoItems:photoItems selectedIndex:imageView.tag];
    [Browser showPhotoBrowser];

网络图片浏览

    NSMutableArray *photoItems = [NSMutableArray array];
    int i = 0;
    for (NSString *url in self.originalURLs) { 
        FLAnimatedImageView *imageViewSource = self.bgview.subviews[i];
        DMLPhotoItem *item = [[DMLPhotoItem alloc] initWithSourceView:imageViewSource thumbImage:imageViewSource.image       imageUrl:[NSURL URLWithString:url]];
        [photoItems addObject:item];
        i ++;
    }
    DMLPhotoBrowser *Browser = [[DMLPhotoBrowser alloc] initWithPhotoItems:photoItems selectedIndex:imageView.tag];
    [Browser showPhotoBrowser];

Author

NickName:MrDML, E-Mail:[email protected], QQ:1969339388

License

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

Latest podspec

{
    "name": "DMLPhotoBrowser",
    "version": "0.1.6",
    "summary": "DMLPhotoBrowser.",
    "description": "The image browser supports both local and network.",
    "homepage": "https://github.com/MrDML/DMLPhotoBrowser",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "MrDML": "[email protected]"
    },
    "source": {
        "git": "https://github.com/MrDML/DMLPhotoBrowser.git",
        "tag": "0.1.6"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "DMLPhotoBrowser/Classes/**/*",
    "dependencies": {
        "FLAnimatedImage": [
            "~> 1.0.12"
        ],
        "SDWebImage": [
            "~> 4.1.0"
        ]
    }
}

Pin It on Pinterest

Share This