HyphenateSDK  3.3.0
构造函数 | 属性 | 所有成员列表
EMImageMessageBody类 参考

#import <EMImageMessageBody.h>

类 EMImageMessageBody 继承关系图:
EMFileMessageBody EMMessageBody

构造函数

(instancetype) - initWithData:thumbnailData:
 
(CGFloat compressRatio) - __deprecated_msg
 
- 构造函数 继承自 EMFileMessageBody
(instancetype) - initWithLocalPath:displayName:
 
(instancetype) - initWithData:displayName:
 

属性

CGSize size
 
CGFloat compressionRatio
 
NSString * thumbnailDisplayName
 
NSString * thumbnailLocalPath
 
NSString * thumbnailRemotePath
 
NSString * thumbnailSecretKey
 
CGSize thumbnailSize
 
long long thumbnailFileLength
 
EMDownloadStatus thumbnailDownloadStatus
 
- 属性 继承自 EMFileMessageBody
NSString * displayName
 
NSString * localPath
 
NSString * remotePath
 
NSString * secretKey
 
long long fileLength
 
EMDownloadStatus downloadStatus
 
- 属性 继承自 EMMessageBody
EMMessageBodyType type
 

详细描述

EMImageMessageBody.h 图片消息体

作者
Hyphenate
版本
3.00

图片消息体,SDK发送消息前会根据compressRatio压缩通过-(instancetype)initWithData:displayName:或 -(instancetype)initWithData:thumbnailData:创建的消息体的图片

函数文档

- (CGFloat compressRatio) __deprecated_msg ("Use - compressionRatio") 

设置发送图片消息时的压缩率,1.0时不压缩,默认值是0.6,如果设置了小于等于0的值,则使用默认值

- (instancetype) initWithData: (NSData *)  aData
thumbnailData: (NSData *)  aThumbnailData 

初始化图片消息体

参数
aData图片数据
aThumbnailData缩略图数据
返回
图片消息体实例

属性说明

- (CGFloat) compressionRatio
readwritenonatomicassign

设置发送图片消息时的压缩率,1.0时不压缩,默认值是0.6,如果设置了小于等于0的值,则使用默认值

- (CGSize) size
readwritenonatomicassign

图片附件的尺寸

- (NSString*) thumbnailDisplayName
readwritenonatomiccopy

缩略图的显示名

- (EMDownloadStatus) thumbnailDownloadStatus
readwritenonatomicassign

缩略图下载状态

- (long long) thumbnailFileLength
readwritenonatomicassign

缩略图文件的大小, 以字节为单位

- (NSString*) thumbnailLocalPath
readwritenonatomiccopy

缩略图的本地路径

- (NSString*) thumbnailRemotePath
readwritenonatomiccopy

缩略图在服务器的路径

- (NSString*) thumbnailSecretKey
readwritenonatomiccopy

缩略图的密钥, 下载缩略图时需要密匙做校验

- (CGSize) thumbnailSize
readwritenonatomicassign

缩略图的尺寸


该类的文档由以下文件生成: