NIMKitMediaFetcher.h 968 Bytes
//
//  NIMKitMediaFetcher.h
//  NIMKit
//
//  Created by chris on 2016/11/12.
//  Copyright © 2016年 NetEase. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <Photos/Photos.h>


typedef void(^NIMKitLibraryFetchResult)(NSArray *images, NSString *path, PHAssetMediaType type);

typedef void(^NIMKitCameraFetchResult)(NSString *path, UIImage *image);

typedef void(^NIMKitLibraryFetchResultWithOriginalPhoto)(NSArray *paths, PHAssetMediaType type);

typedef void(^NIMKitCancelResult)(BOOL cancel);

@interface NIMKitMediaFetcher : NSObject

@property (nonatomic,assign) NSInteger limit;

@property (nonatomic,strong) NSArray *mediaTypes; //kUTTypeMovie,kUTTypeImage

@property (nonatomic,copy)   NIMKitLibraryFetchResultWithOriginalPhoto  originalPhotoResultHandler;

- (void)fetchPhotoFromLibrary:(NIMKitLibraryFetchResult)result;

- (void)fetchMediaFromCamera:(NIMKitCameraFetchResult)result;

- (void)fetchAlbumFromCancel:(NIMKitCancelResult)result;


@end