Git Product home page Git Product logo

mldphotomanager's Introduction

MLDPhotoManager


20171013更新说明:

  • 优化:不再显示照片数为0的相册
  • 修复:issues #1在一个相册内选够9张,换到另一个相册,再换回来,取消之前选中项,再选时会提示数量已满
  • 增加:plist里面的相册相机权限(之前忘记了😆)

20170628更新说明:

  • 更新了api增加了最大张数的参数

基于@gang544043963大神的LGPhotoBrowser项目再次封装的

111

项目初衷

本身LGPhotoBrowser已经很是完美了,完成了很多我们的需求,但是在我的项目中会多次出现AlertController让用户选择相机还是相册这种需求实例.在这个基础上想到了再次封装.

用法

只需要将MLDPhotoManager拖入项目中即可

[MLDPhotoManager showPhotoManager:sender
                withMaxImageCount:9
                  withCameraImage:^(UIImage *cameraImage)
 {
     NSLog(@"cameraImage==%@",cameraImage);
 }
                   withAlbumArray:^(NSArray *albumArray)
 {
     NSLog(@"albumArray==%@",albumArray);
 }];

基于Block方便管理

说明

+ (void)showPhotoManager:(UIView *)carryView
       withMaxImageCount:(NSInteger)maxCount
         withCameraImage:(void(^)(UIImage *cameraImage))cameraImage
          withAlbumArray:(void(^)(NSArray *albumArray))albumArray

其中(UIView *)carryView这个参数要说明一下. 方法是直接呼出了UIAlertController但是在 iPadUIAlertController不能自下而上的直接弹出,需要一个停靠的View所以需要告诉控制器是哪个View响应了这个UIAlertController.

eg:你是按了一个 Button 想呼出UIAlertController那么这个 Button 就是 carryView

注意

LGPhotoBrowser项目已经集成了DACircularProgress SDWebImage如果项目中有这两个库的童鞋可以删除. 位置 LGPhotoBrowser-->Classes-->Third

本项目应用于iOS 9+

再次鸣谢

再次鸣谢@gang544043963大神的LGPhotoBrowser项目,从这个项目中学习到了很多东西.👍👍👍

在这里找到我

E-Mail: [email protected]

Weibo: @MoliySDev

mldphotomanager's People

Contributors

youngwifemoliy avatar

Stargazers

TonyAng avatar

Watchers

James Cloos avatar zhaomengshan 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.