iOS 相册,照片选择,图片选择器,类似微信的样子

TSPhotoBrow
Photos.framework封装的图片选择浏览器,适配iOS8以上
demo

🌚我什么都没看见(前女友照,就当做没看见吧!嗯)


示例图.png

使用方法

- (void)localPhoto

{
   __weak typeof(self)weakSelf = self;
   // --检查相册权限
   [TSCameraHelper checkPhotoLibraryAuthorizationStatus:^(BOOL granted) {
       if (granted) {
           // --设置图片回调
           [TSPhotoManager sharedInstance].imageCallBack = ^(NSArray<UIImage *> *images) {
               [weakSelf.images addObjectsFromArray:images];
               [weakSelf updateCollectionViewHeight];
                
           };
           // --设置Data回调
           [TSPhotoManager sharedInstance].imageDataCallBack = ^(NSArray<NSData *> *imageDatas) {
                
           };
           // --设置需要的图片尺寸
           [TSPhotoManager sharedInstance].photoSize = CGSizeMake(PhotoItemWH, PhotoItemWH);
           // --设置图片数量
           [TSPhotoManager sharedInstance].maxPhotoCount = weakSelf.maxImageCount - weakSelf.images.count;
           // --跳转相册
           [weakSelf.delegateViewController presentViewController:[TSPhotoNavigationController new] animated:YES completion:nil];
       }
   }];
}

demo

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容