更新时间:2025-05-29 GMT+08:00
设置头像风格
setParticipantAvatarStyle:
接口描述
该接口用于设置与会者头像风格。
注意事项
- 该接口非必需调用,若不设置,则使用默认的头像。
方法定义
- (HWMSDKERR)setAvatarStyle:(HWMUISDKAvatarStyleModel *)avatarStyle;
参数描述
参数 |
是否必须 |
类型 |
描述 |
---|---|---|---|
backgroundColor |
是 |
NSString * |
背景色。 |
textColor |
是 |
NSString * |
文字颜色。 |
nameShowType |
是 |
姓名显示风格。 |
|
avatarShape |
是 |
头像形状。 |
|
phoneIconPath |
是 |
NSString * |
手机图标路径。 |
boardIconPath |
是 |
NSString * |
大屏图标路径。 |
枚举值 |
描述 |
---|---|
HWMUISDKFirstLetter |
显示拼音首字母(如果是英文名则显示首字母)。 |
HWMUISDKFamilyName |
显示姓氏(如果是英文名则显示首字母)。 |
返回值
接口是否调用成功。
示例代码
/// 设置头像风格 - (void)customAvatarStyle { HWMUISDKAvatarStyleModel *style = [[HWMUISDKAvatarStyleModel alloc] init]; style.backgroundColor = this.getBackgrounColor(); style.textColor = this.getTextColor(); style.nameShowType = this.getNameShowType(); style.avatarShape = this.getAvatarShaoe(); style.phoneIconPath = this.getPhoneIconPath(); style.boardIconPath = this.getBoardIconPath(); HWMSDKERR result = [[HWMBizSdk getBizOpenApi] setAvatarStyle:self.avatarStyleModel]; }
父主题: 界面定制