AVIMTypedMessage Class Reference
Inherits from | AVIMMessage : NSObject |
---|---|
Declared in | AVIMTypedMessage.h |
– setObject:forKey:
Add custom property for message.
- (void)setObject:(nullable id)object forKey:(NSString *)key
Parameters
object |
The property value. |
---|---|
key |
The property name. |
Discussion
Add custom property for message.
Declared In
AVIMTypedMessage.h
– objectForKey:
Get a user-defiend property for a key.
- (nullable id)objectForKey:(NSString *)key
Parameters
key |
The key of property that you want to get. |
---|
Return Value
The value for key.
Discussion
Get a user-defiend property for a key.
Declared In
AVIMTypedMessage.h
+ registerSubclass
子类调用此方法进行注册,一般可在子类的 [+(void)load] 方法里面调用
+ (void)registerSubclass
Discussion
子类调用此方法进行注册,一般可在子类的 [+(void)load] 方法里面调用
Declared In
AVIMTypedMessage.h
+ messageWithText:attachedFilePath:attributes:
使用本地文件,创建消息。
+ (instancetype)messageWithText:(nullable NSString *)text attachedFilePath:(NSString *)attachedFilePath attributes:(nullable NSDictionary *)attributes
Parameters
text |
- 消息文本。 |
---|---|
attachedFilePath |
- 本地文件路径。 |
attributes |
- 用户附加属性。 |
Discussion
使用本地文件,创建消息。
Declared In
AVIMTypedMessage.h
+ messageWithText:file:attributes:
使用 AVFile,创建消息。
+ (instancetype)messageWithText:(nullable NSString *)text file:(AVFile *)file attributes:(nullable NSDictionary *)attributes
Parameters
text |
- 消息文本。 |
---|---|
file |
- AVFile 对象。 |
attributes |
- 用户附加属性。 |
Discussion
使用 AVFile,创建消息。
Declared In
AVIMTypedMessage.h