dennisxiaoding / dnimagepicker Goto Github PK
View Code? Open in Web Editor NEWAn imagePicker functioned like wechat
An imagePicker functioned like wechat
能支持Photos Framework吗
预览图片的触摸区域,就是单击 双击的效果区域
建议把项目添加到cocoaPods里面,现在用pods管理的项目还挺多的,想要使用这个库,但是用pods搜索出来的只有swift的,所以请作者把项目添加一下!
我发现有两个小问题
1.从相册选择里选择图片,当图片过多的时候 显示不全,系统是IOS8.4.1,设备是iphone5s。
2.如果导入MWPhotobrowse 库后,会与你这个DNImagePicker冲突,要删除MWTapDetectingImageView才可以编译通过。
当选择照片后,按home键退出,到系统的照片里删除照片后,已选择的照片被删掉,直接黑色替代,建议保留。。。
比如,选择了3张照片,关了后,再次选择时,怎么让这3张保持选择状态
Failed to load photos saved on iCloud, because DNImagePicker bases on ALAssetsLibrary which doesn't support iCloud API.
因为这个库是基于ALAssetsLibrary实现的,从iOS 8+之后苹果又推出了PHPhotoLibrary,这个PHPhotoLibrary可以访问用户存储在iCloud之上的照片。所以如果是要弄新项目,建议大家换到其他库吧。
On iOS 8.1 [library assetForUrl] Photo Streams always returns nil.
[lib enumerateGroupsWithTypes:ALAssetsGroupPhotoStream
usingBlock:^(ALAssetsGroup *group, BOOL *stop)
{
[group enumerateAssetsWithOptions:NSEnumerationReverse
usingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) {
if([[result valueForProperty:ALAssetPropertyAssetURL] isEqual:dnasset.url])
{
[weakSelf setCell:blockCell asset:result];
*stop = YES;
}
}];
}
failureBlock:^(NSError *error)
{
[weakSelf setCell:blockCell asset:nil];
}];
Using enumerateGroupsWithTypes with specific type- ALAssetsGroupPhotoStream
图片很多时候最后一行的图片会被遮挡小部分,
修改了CollectionView的Y之后正常
fetchImageWithSize 一次返回同一个图片两个image,一个模糊的,一个清晰的,能不能只要其中一个?
Image can not be scrolled in some specific size.
不理解为什么当取出图片时候为什么要创建一个DNAsset这样的东西去暂时存储系统的ALAsset。崩溃在你取出的URL放进库里不能正常再次获取到图片。希望博主分享一下这样设计的好处。
Very good. I love you so much!!!
想把视频给过滤掉,但是没找到在哪里修改
Thanks for your code, it helps me a lot. But I found there's a mistake in the model named "DNAsset".
*** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer bounds contains NaN: [0 0; nan 480]'
*** First throw call stack:
(
0 CoreFoundation 0x0332fa14 exceptionPreprocess + 180
1 libobjc.A.dylib 0x02a4fe02 objc_exception_throw + 50
2 CoreFoundation 0x0332f93d +[NSException raise:format:] + 141
3 QuartzCore 0x01148f06 _ZN2CA5Layer10set_boundsERKNS_4RectEb + 260
4 QuartzCore 0x0114919e -[CALayer setBounds:] + 136
5 UIKit 0x01456153 -[UIView _createLayerWithFrame:] + 754
6 UIKit 0x01456837 UIViewCommonInitWithFrame + 830
7 UIKit 0x01456485 -[UIView initWithFrame:] + 138
8 UIKit 0x0148c6b3 -[UIScrollView initWithFrame:] + 73
9 UIKit 0x01d131b9 -[UICollectionView initWithFrame:collectionViewLayout:] + 144
10 DHCMApp 0x0004f789 -[DNImageFlowViewController imageFlowCollectionView] + 569
11 DHCMApp 0x0004d31a -[DNImageFlowViewController setupView] + 554
12 DHCMApp 0x0004ca78 -[DNImageFlowViewController viewDidLoad] + 88
13 UIKit 0x0157e2ae -[UIViewController _sendViewDidLoadWithAppearanceProxyObjectTaggingEnabled] + 44
14 UIKit 0x01582dce -[UIViewController loadViewIfRequired] + 1384
15 UIKit 0x01589406 -[UIViewController __viewWillAppear:] + 114
16 UIKit 0x015ac5b9 -[UIViewController(UIContainerViewControllerProtectedMethods) beginAppearanceTransition:animated:] + 202
17 UIKit 0x015be9cc -[UINavigationController _startCustomTransition:] + 1389
18 UIKit 0x015d0769 -[UINavigationController _startDeferredTransitionIfNeeded:] + 803
19 UIKit 0x015d1ada -[UINavigationController __viewWillLayoutSubviews] + 68
20 UIKit 0x017adc4a -[UILayoutContainerView layoutSubviews] + 252
21 UIKit 0x01483008 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 810
22 libobjc.A.dylib 0x02a64059 -[NSObject performSelector:withObject:] + 70
23 QuartzCore 0x0115280a -[CALayer layoutSublayers] + 144
24 QuartzCore 0x011464ee _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 388
25 QuartzCore 0x01146352 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 26
26 QuartzCore 0x01138e8b _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 317
27 QuartzCore 0x0116ce03 _ZN2CA11Transaction6commitEv + 561
28 QuartzCore 0x0116e674 _ZN2CA11Transaction17flush_transactionEv + 50
29 UIKit 0x013e7dfa _afterCACommitHandler + 197
30 CoreFoundation 0x03248ffe __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION + 30
31 CoreFoundation 0x03248f5e __CFRunLoopDoObservers + 398
32 CoreFoundation 0x0323e8dc __CFRunLoopRun + 1340
33 CoreFoundation 0x0323e0e6 CFRunLoopRunSpecific + 470
34 CoreFoundation 0x0323defb CFRunLoopRunInMode + 123
35 GraphicsServices 0x0566a664 GSEventRunModal + 192
36 GraphicsServices 0x0566a4a1 GSEventRun + 104
37 UIKit 0x013b6bfa UIApplicationMain + 160
38 DHCMApp 0x000ceaba main + 138
39 libdyld.dylib 0x03d54a21 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
像JKImagePicker那样,asset有一个image属性,感觉这样更方便。
感谢作者开源,已经80%的仿微信了,除了相册照片太多后预览滑动性能稍差,其他都非常不错
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.