Coder Social home page Coder Social logo

xingql / zlphotolib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from makezl/zlphotolib

0.0 2.0 0.0 42.42 MB

This is a photo album multiple-choice / photo browser example

Home Page: http://weibo.com/makezl

License: Other

Objective-C 99.89% Ruby 0.11%

zlphotolib's Introduction

This is a photo album multiple-choice / photo browser example

继承图片多选/图片浏览器/相机连拍的一套图片库

新特性:浏览器支持屏幕旋转、优化了数据源。

About Detached in PhotoLib (抽离PhotoLib)

MLCamera 自定义相机连拍MLCamera

MLSelectPhoto 相册多选库 MLSelectPhoto

MLPhotoBrowser 图片浏览器 MLPhotoBrowser

Browser Continued in ...

Demo Show

image image image

Recoder SelectedAssets/Limit SelectedAssets (记录/限制功能)

image

Custom ZLCamera (自定义相机连拍)

Not Power没权限

相册多选

// 创建图片多选控制器
ZLPhotoPickerViewController *pickerVc = [[ZLPhotoPickerViewController alloc] init];
// 默认显示相册里面的内容SavePhotos
pickerVc.status = PickerViewShowStatusSavePhotos;
// 选择图片的最小数,默认是9张图片最大也是9张
pickerVc.minCount = 4; 
[pickerVc show];

// block回调或者代理
// 用block来代替代理
pickerVc.delegate = self;    
/**
 *
 传值可以用代理,或者用block来接收,以下是block的传值
 __weak typeof(self) weakSelf = self;
 pickerVc.callBack = ^(NSArray *assets){
    weakSelf.assets = assets;
    [weakSelf.tableView reloadData];
 };
 */    

// 代理回调方法
- (void)pickerViewControllerDoneAsstes:(NSArray *)assets{
  self.assets = assets;
  [self.tableView reloadData];
}

ZLPhotoPickerBrowserViewController 图片游览器

ZLPhotoPickerBrowserViewController *pickerBrowser = [[ZLPhotoPickerBrowserViewController alloc] init];
// 传入点击图片View的话,会有微信朋友圈照片的风格
pickerBrowser.toView = cell.imageView;
// 数据源/delegate
pickerBrowser.delegate = self;
pickerBrowser.dataSource = self;
// 是否可以删除照片
pickerBrowser.editing = YES;
// 当前显示的分页数
pickerBrowser.currentIndexPath = indexPath;
// 展示控制器
[pickerBrowser show];

ZLCameraViewController 自定义相机连拍

ZLCameraViewController *cameraVc = [[ZLCameraViewController alloc] init];
[cameraVc startCameraOrPhotoFileWithViewController:self complate:^(id object) {
    // to do.. 回调内容
}];
self.cameraVc = cameraVc;

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.

zlphotolib's People

Contributors

makezl avatar larryonline avatar xuxie avatar zhugexiaobo avatar hongdong avatar

Watchers

James Cloos avatar Mass avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.