Setting the Profile Picture Style
setParticipantAvatarStyle:
API Description
This API is used to set the profile picture style of participants.
Precautions
- This API is optional. If it is not called, the default profile picture style is used.
Method Definition
- (HWMSDKERR)setAvatarStyle:(HWMUISDKAvatarStyleModel *)avatarStyle;
Parameter Description
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
backgroundColor |
Yes |
NSString * |
Background color. |
textColor |
Yes |
NSString * |
Text color. |
nameShowType |
Yes |
Name display style. |
|
avatarShape |
Yes |
Profile picture shape. |
|
phoneIconPath |
Yes |
NSString * |
Path of the mobile phone icon. |
boardIconPath |
Yes |
NSString * |
Path of the large display icon. |
Enumerated Value |
Description |
---|---|
HWMUISDKFirstLetter |
For a Chinese name, the first letter in pinyin is displayed. For an English name, the first letter is displayed. |
HWMUISDKFamilyName |
For a Chinese name, the family name is displayed. For an English name, the first letter is displayed. |
Enumerated Value |
Description |
---|---|
HWMUISDKCircle |
Circle. |
Return Values
Whether the API is successfully called.
Sample Code
/// Set the profile picture style. - (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]; }
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot