Customizing the Profile Picture Display
downloadHeadPortraitWithThirdAccount: account: number: completionBlock:
API Description
This API is used to customize the profile picture display after login.
Precautions
- The profile picture of a user who has not logged in cannot be customized.
- Profile pictures can be uploaded (see the API for uploading a profile picture) or implemented through injection. If both methods are implemented, the blocking is implemented, and the uploaded profile picture is not downloaded from the server.
Method Definition
1
|
- (void)downloadHeadPortraitWithThirdAccount:(NSString *)thirdAccount account:(NSString *)account number:(NSString *)number completionBlock:(void (^)(NSError * _Nullable, NSString * _Nullable))completionBlock |
Parameter Description
Parameter |
Type |
Description |
---|---|---|
thirdAccount |
NSString |
This parameter is preferentially used in the app ID login scenario. |
account |
NSString |
This parameter is preferentially used in the account and password login scenario. |
number |
NSString |
This parameter is preferentially used in the cross-enterprise scenario. |
Return Values
None
Sample Code
- (void)downloadHeadPortraitWithThirdAccount:(NSString *)thirdAccount account:(NSString *)account number:(NSString *)number completionBlock:(void (^)(NSError * _Nullable, NSString * _Nullable))completionBlock { if (completionBlock) { /// Return the image path to the SDK. NSInteger index = arc4random() % 3; NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:[NSString stringWithFormat:@"head_icon_%lu", index] ofType:@"png"]; completionBlock(nil, path); } }
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