BMXFileAttachment Class Reference

Inherits from BMXMessageAttachment :
NSObject
Declared in BMXFileAttachment.h

Properties

displayName

显示名称

@property (nonatomic, copy) NSString *displayName

Discussion

显示名称

Declared In

  • BMXFileAttachment.h

downLoadStatus

下载状态

@property (nonatomic, assign) BMXAttachmentDownloadStatus downLoadStatus

Discussion

下载状态

Declared In

  • BMXFileAttachment.h

fileLength

文件大小

@property (nonatomic, assign) long long fileLength

Discussion

文件大小

Declared In

  • BMXFileAttachment.h

path

本地路径

@property (nonatomic, copy) NSString *path

Discussion

本地路径

Declared In

  • BMXFileAttachment.h

url

文件url

@property (nonatomic, copy) NSString *url

Discussion

文件url

Declared In

  • BMXFileAttachment.h

Instance Methods

initWithData:displayName:conversationId:

初始化文件BMXFileAttachment

- (instancetype)initWithData:(NSData *)*aData* displayName:(NSString *)*displayName* conversationId:(NSString *)*conversationId*

Parameters

aData
文件数据

displayName
文件名称

conversationId
会话id

Return Value

BMXFileAttachment

Discussion

初始化文件BMXFileAttachment

Declared In

  • BMXFileAttachment.h

Example:

    NSString *address = locationInfo[@"address"];
            
    BMXLocationAttachment *locationment = [[BMXLocationAttachment alloc] initWithLatitude:latitude longitude:longitude address:address];
    messageObject = [self configMessage:locationment];
    messageObject.contentType = BMXContentTypeLocation;
    messageModel.content = [NSString stringWithFormat:NSLocalizedString(@"Current_location", @"当前位置:%@"),locationment.address];
    break;
}
case MessageBodyType_File: {
    NSDictionary *dic = [NSDictionary dictionaryWithDictionary:content];
    BMXFileAttachment *fileAttachment = [[BMXFileAttachment alloc] initWithData:dic[@"data"] displayName:dic[@"displayName"] conversationId:[NSString stringWithFormat:@"%ld",(long)self.conversationId]];

initWithPath:displayName:conversationId:

初始化文件BMXFileAttachment

- (instancetype)initWithPath:(NSString *)*path* displayName:(NSString *)*displayName* conversationId:(NSString *)*conversationId*

Parameters

path
文件路径

displayName
文件名称

conversationId
会话id

Discussion

初始化文件BMXFileAttachment

Declared In

  • BMXFileAttachment.h

Example:

© 2019-2022 美信拓扑 | 官网 该文件修订时间: 2022-09-21 11:43:07

results matching ""

    No results matching ""