[翻译] DoImagePickerController

简介:

DoImagePickerController

An image picker controller with single selection and multiple selection. Support to select lots photos with panning gesture.

这是一个图片选择器,可以选择一张或者多张图片.支持移动手势选择大量的图片.

 

various column count : 2, 3 and 4  - 支持的列数为2,3,4

 

select multiple photos with pan gesture - 支持pan手势

 

select album - 支持相册选取

 

Requirements

  • iOS 7.0 and greater
  • ARC

 

Features

  • adjustable column count : 2 ~ 4                                  支持的列数是 2 ~ 4
  • adjustable count to select photos                                
  • multiple selection with pan gesture                              支持pan手势选择图片
  • landscape mode                                                         支持横竖屏
  • go top or botom directly by tapping right side buttons   支持点击直接到顶部或者底部
  • long tap on thumbnail to show preview                        长按可以查看图片预览
  • tap or drag preview to close preview                            点击或者拖拽来关闭预览

 

Examples

  • AssetHelper : helper class for asset

Code:

// YES : old photo -> new photo
// NO  : new photo -> old photo
@property (readwrite) BOOL bReverse; // methods to get asset data - (void)getGroupList:(void (^)(NSArray *))result; - (void)getPhotoListOfGroup:(ALAssetsGroup *)alGroup result:(void (^)(NSArray *))result; - (void)getPhotoListOfGroupByIndex:(NSInteger)nGroupIndex result:(void (^)(NSArray *))result; - (void)getSavedPhotoList:(void (^)(NSArray *))result error:(void (^)(NSError *))error; 
  • DoImagePickerController

Code:

DoImagePickerController *cont = [[DoImagePickerController alloc] initWithNibName:@"DoImagePickerController" bundle:nil]; cont.delegate = self; cont.nMaxCount = 4; // larger than 1 cont.nColumnCount = 3; // 2, 3, or 4 cont.nResultType = DO_PICKER_RESULT_UIIMAGE; // get UIImage object array : common case // if you want to get lots photos, you had better use DO_PICKER_RESULT_ASSET. [self presentViewController:cont animated:YES completion:nil]; 

目录
相关文章
|
存储 自然语言处理 前端开发
从零写一个Recoil(翻译)
Rewriting Recoil from scratchrecoil是facebook编写的一个库,它之所以诞生是因为人体工程学、context的性能问题和useState。这是一个非常聪明的库,几乎每个人都会找到它的用途——如果你想了解更多,请查看这段解释视频。刚开始我被图论和recoil惊到了,但渐渐的理解后,感觉也没那么特别了。也许我也可以实现一个类似的东西。我自己实现的版本和recoil
238 0
从零写一个Recoil(翻译)
《Wir wilden weisen Frauen》翻译——<连载>
上周去逛图书馆,借了本德语原版的书。今天突然想起来了,就翻开来看。我不知道这本书是否有中文版的,不管有没有吧,我尝试翻译一下以提高自身的德语水平。每天花上一个半小时来翻译,我想应该不能翻译出来几句的。
801 0
|
iOS开发 Android开发 开发工具