GithubHelp home page GithubHelp logo

jvlstudio / ios-multiphotopicker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xuhengfei/ios-multiphotopicker

0.0 2.0 0.0 375 KB

A Multi Photo Picker on iPhone,support pick photos from album and camera

ios-multiphotopicker's Introduction

iOS-MultiPhotoPicker

A Multi Photo Picker on iPhone,support pick photos from album and camera

  

Quick Start

1.import all files in dir: XHFMultiPhotoPicker
2.import framework include: AssetsLibrary.framework AVFoundation.framework
3.code,for example:

  //set temp folder, save photos user select here (not required, it have default folder)  
  [XHFMultiPhotoPicker setLocalCacheFolder:@"path"];
  
  [XHFMultiPhotoPicker pickWithType:USER_SELECT InitPhotos:nil ViewController:self ResultBlock:^(NSArray *photos){
    //return user select photos
    for(XHFSelectPhoto *p in photos){
      NSLog(@"photo local path:%@",p.localPath);
    }
    //do something here
    //clear folder after work done
    [XHFMultiPhotoPicker clearLocalImages];
  }];

Here is a demo project in source code


iPhone上的多图拾取器,同时支持从相册勾选和摄像头拍摄

  

Quick Start

1.导入XHFMultiPhotoPicker目录下的所有文件
2.在工程中引入AssetsLibrary.framework AVFoundation.framework
3.编写代码,示例如下:

-(void)viewDidLoad{
  //设置临时文件夹,用来保存用户选择的图片(也可以不设置,有默认值)
  [XHFMultiPhotoPicker setLocalCacheFolder:@"path"];
  //弹出照片选择组件,有4个参数,分别是:
  //Type:USER_SELECT 表示用户自己来选择拍照还是相册 (也可以使用其他2个参数:ALBUM  CAMERA)
  //InitPhotos:self.photos 用户已经选中的照片(传入nil表示还没有选中的图片)
  //ViewController: 当前的UIViewController
  //ResultBlock: 用户选择完成后,返回选中的照片数组
  [XHFMultiPhotoPicker pickWithType:USER_SELECT InitPhotos:nil ViewController:self ResultBlock:^(NSArray *photos){
    //返回用户选中的照片Array
    for(XHFSelectPhoto *p in photos){
      NSLog(@"photo local path:%@",p.localPath);
    }
    //do something
    //清除临时照片文件
    [XHFMultiPhotoPicker clearLocalImages];
  }];
  
}

MultiPhotoPickerExample中有demo工程,可以试用

求设计师!
因为这个组件没有设计师,界面不够好看。
有哪位设计师愿意支持一下的,欢迎联系 QQ:82950408
我们一起把这个组件做的漂亮一点

ios-multiphotopicker's People

Contributors

xuhengfei avatar

Watchers

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