Latest 0.5.0
Homepage https://github.com/MakeZL/MLPhotoBrowser
License MIT
Platforms ios 6.0, requires ARC
Dependencies SDWebImage, DACircularProgress
Frameworks AssetsLibrary
Authors

A simple iOS Photo browser Library, Support optional animation.

image

CocoaPod

pod search 'MLPhotoBrowser'

浏览器重大简化

简化数据源(依然可以用保留),简化只需要传photos数组就可以了 > 看Demo2

Use

import "MLPhotoBrowserViewController.h"
// 图片游览器
MLPhotoBrowserViewController *photoBrowser = [[MLPhotoBrowserViewController alloc] init];
// 缩放动画
photoBrowser.status = UIViewAnimationAnimationStatusZoom;
// 可以删除
photoBrowser.editing = YES;
// 数据源/delegate
photoBrowser.delegate = self;
// self.photos包含了ZLPhotoBrowserPhoto就好了
photoBrowser.photos = self.photos;
// 当前选中的值
photoBrowser.currentIndexPath = [NSIndexPath indexPathForItem:indexPath.row inSection:0];
// 展示控制器
[self.navigationController presentViewController:photoBrowser animated:NO completion:nil];
MLPhotoBrowserViewControllerDelegate
@optional
/**
 *  准备删除那个图片
 *
 *  @param index        要删除的索引值
 */
- (BOOL)photoBrowser:(MLPhotoBrowserViewController *)photoBrowser willRemovePhotoAtIndexPath:(NSIndexPath *)indexPath;
/**
 *  删除indexPath对应索引的图片
 *
 *  @param indexPath        要删除的索引值
 */
- (void)photoBrowser:(MLPhotoBrowserViewController *)photoBrowser removePhotoAtIndexPath:(NSIndexPath *)indexPath;
/**
 *  滑动结束的页数
 *
 *  @param page         滑动的页数
 */
- (void)photoBrowser:(MLPhotoBrowserViewController *)photoBrowser didCurrentPage:(NSUInteger)page;
/**
 *  滑动开始的页数
 *
 *  @param page         滑动的页数
 */
- (void)photoBrowser:(MLPhotoBrowserViewController *)photoBrowser willCurrentPage:(NSUInteger)page;

/**
 *  点击每个Item时候调用
 */
- (void)photoBrowser:(MLPhotoBrowserViewController *)photoBrowser photoDidSelectView:(UIView *)scrollBoxView atIndexPath:(NSIndexPath *)indexPath;

/**
 *  返回用户自定义的toolBarView(类似tableView FooterView)
 *
 *  @return 返回用户自定义的toolBarView
 */
- (MLPhotoBrowserCustomToolBarView *)photoBrowserShowToolBarViewWithphotoBrowser:(MLPhotoBrowserViewController *)photoBrowser;

Contact

@weibo : 我的微博

License

MLSelectPhoto is published under MIT License

Copyright (c) 2015 MakeZL (@MakeZL)

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Latest podspec

{
    "name": "MLPhotoBrowser",
    "version": "0.5.0",
    "summary": "A simple iOS Photo browser Library, Support optional animation.",
    "homepage": "https://github.com/MakeZL/MLPhotoBrowser",
    "license": "MIT",
    "authors": {
        "zhangleo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/MakeZL/MLPhotoBrowser.git",
        "tag": "0.5.0"
    },
    "platforms": {
        "ios": "6.0"
    },
    "requires_arc": true,
    "frameworks": "AssetsLibrary",
    "source_files": "MLPhotoBrowser/Classes/**/*",
    "resources": "MLPhotoBrowser/MLPhotoBrowser.bundle",
    "dependencies": {
        "SDWebImage": [
            "~> 3.7"
        ],
        "DACircularProgress": []
    }
}

Pin It on Pinterest

Share This