Skip to content

Commit ae8850c

Browse files
author
mengyaoyao
committed
add imagePicker
1 parent 69d6657 commit ae8850c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+5910
-0
lines changed

.DS_Store

-4 KB
Binary file not shown.

CocoaAsyncSocket_TCP.xcodeproj/project.pbxproj

Lines changed: 110 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
//
2+
// UIImage+photoPicker.h
3+
// JYHomeCloud
4+
//
5+
// Created by 孟遥 on 16/12/19.
6+
// Copyright © 2016年 JYall Network Technology Co.,Ltd. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@class JYPhotoVideoModel;
12+
13+
//返回选中的所有图片 , 原图或者压缩图
14+
typedef void(^JYPhotoPickerImagesCallback)(NSArray<JYPhotoVideoModel *> *images);
15+
16+
//返回照片原图的data
17+
typedef void(^JYPhotoPickerDataCallback)(NSArray<JYPhotoVideoModel *> *datas);
18+
19+
//返回视频存储的位置
20+
typedef void(^JYVideoPathCallback)(NSString *filePath,NSString *size);
21+
22+
//立刻返回封面图
23+
typedef void(^JYVideoCoverImageBackRightNow)(UIImage *coverImage,NSString *fileName,long long int duration);
24+
25+
26+
@interface UIImage (photoPicker)
27+
28+
29+
30+
31+
/**
32+
获取选中照片数组模型 ,此方法用于打开相册选择照片 , 是否选择原图 由用户自行决定
33+
34+
@param imagesCallback <#imagesCallback description#>
35+
@param target 控制器
36+
@param count 最大选择张数
37+
@param needShowButton 是否需要展示拍照按钮
38+
*/
39+
+ (void)openPhotoPickerGetImages:(JYPhotoPickerImagesCallback)imagesCallback target:(UIViewController *)target maxCount:(NSInteger)count isNeedShowTakePictureButton:(BOOL)needShowButton rect:(CGRect)rect;
40+
41+
42+
43+
44+
/**
45+
获取原图data , 此方法仅限于上传原图使用 , 如不需要原图 , 则使用上述方法 , 避免获取图片过大
46+
47+
@param photosCallback <#photosCallback description#>
48+
@param target 控制器
49+
@param count 最大选择张数
50+
@param needShowButton 是否需要展示拍照按钮
51+
*/
52+
+ (void)openPhotoPickerGetOrignalData:(JYPhotoPickerDataCallback)photosCallback taget:(UIViewController *)target maxCount:(NSInteger)count isNeedShowTakePictureButton:(BOOL)needShowButton;
53+
54+
55+
56+
/**
57+
IM专用
58+
59+
@param imagesCallback <#photosCallback description#>
60+
@param target <#target description#>
61+
@param count <#count description#>
62+
*/
63+
+ (void)openPhotoPickerGetImages:(JYPhotoPickerImagesCallback)imagesCallback target:(UIViewController *)target maxCount:(NSInteger)count;
64+
65+
/**
66+
获取选中的视频 , 如实现了 JYVideoCoverImageBackRightNow , 则会立马返回一张该视频的缩略图 如不需要,直接传入nil即可
67+
68+
@param videoPathCallback <#videoPathFileNameCallback description#>
69+
@param coverBack <#coverBack description#>
70+
@param target <#target description#>
71+
@param basePath <#basePath description#>
72+
*/
73+
+ (void)openPhotoPickerGetVideo:(JYVideoPathCallback)videoPathCallback coverBackRightNow:(JYVideoCoverImageBackRightNow)coverBack target:(UIViewController *)target CacheDirectory:(NSString *)basePath;
74+
75+
@end

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy