TuSDKTSAssetsManager Class Reference

Inherits from NSObject
Declared in TuSDKTSAsset.h

Overview

媒体资源管理对象

+ sharedAssetsManager

媒体资源管理对象

+ (TuSDKTSAssetsManager *)sharedAssetsManager

Return Value

媒体资源管理对象

Declared In

TuSDKTSAsset.h

+ hasAuthor

是否用户已授权访问系统相册

+ (BOOL)hasAuthor

Return Value

是否用户已授权访问系统相册

Declared In

TuSDKTSAsset.h

+ notDetermined

是否未决定授权

+ (BOOL)notDetermined

Return Value

是否未决定授权

Declared In

TuSDKTSAsset.h

+ assetsGroupsLoadFailure:

获取系统相册加载错误信息

+ (NSString *)assetsGroupsLoadFailure:(NSError *)error

Parameters

error

错误信息

Return Value

返回详细信息

Declared In

TuSDKTSAsset.h

+ showAlertWithController:loadFailure:

显示系统相册加载错误信息警告

+ (void)showAlertWithController:(UIViewController *)controller loadFailure:(NSError *)error

Parameters

controller

控制器

error

错误信息

Declared In

TuSDKTSAsset.h

+ accessFailedInfo

获取相册访问失败信息

+ (NSString *)accessFailedInfo

Return Value

相册访问失败信息

Declared In

TuSDKTSAsset.h

+ testLibraryAuthor:

测试系统相册授权状态

+ (void)testLibraryAuthor:(TuSDKTSAssetsManagerAuthorBlock)authorBlock

Parameters

authorBlock

系统相册授权回调

Declared In

TuSDKTSAsset.h

+ imageAlbumsWithBlock:

获取系统相册分组

+ (void)imageAlbumsWithBlock:(TuSDKTSAssetsManagerGroupsBlock)groupsBlock

Parameters

groupsBlock

获取系统相册列表回调

Declared In

TuSDKTSAsset.h

+ saveWithImage:compress:metadata:toAblum:completionBlock:ablumCompletionBlock:

保存图片数据到系统相册

+ (BOOL)saveWithImage:(UIImage *)image compress:(CGFloat)compress metadata:(NSDictionary *)metadata toAblum:(NSString *)albumName completionBlock:(TuSDKTSAssetsManagerSaveImageCompletion)completionBlock ablumCompletionBlock:(TuSDKTSAssetsManagerSaveImageAblumCompletion)ablumCompletionBlock

Parameters

image

图片数据

compress

图片压缩比

metadata

照片meta信息

albumName

相册名称

completionBlock

相册名称

ablumCompletionBlock

保存相片到指定相册

Return Value

是否允许操作系统相册

Declared In

TuSDKTSAsset.h

+ saveWithVideo:toAblum:completionBlock:ablumCompletionBlock:

保存视频到系统相册

+ (BOOL)saveWithVideo:(NSURL *)videoURL toAblum:(NSString *)albumName completionBlock:(TuSDKTSAssetsManagerSaveImageCompletion)completionBlock ablumCompletionBlock:(TuSDKTSAssetsManagerSaveImageAblumCompletion)ablumCompletionBlock

Parameters

videoURL

视频文件

albumName

相册名称

completionBlock

相册名称

ablumCompletionBlock

保存相片到指定相册

Return Value

是否允许操作系统相册

Declared In

TuSDKTSAsset.h