0

我已经在颤振框架中集成了 mesibo 聊天 sdk,一切正常,但在启用 useLetterTitleImage = true 后无法获得联系信图像。任何人都可以告诉它为联系人图像android添加了什么功能它正在工作但在ios上出现问题我也是共享文件和屏幕截图在此处输入图像描述

代码 :

             import UIKit
import mesibo

import MesiboUI

class SecondViewController: UIViewController,MesiboDelegate {

    override func viewDidLoad() {
        super.viewDidLoad()
     
        let ui = Mesibo.getInstance().getUiOptions()

        UINavigationBar.appearance().tintColor = UIColor.white
        ui?.contactPlaceHolder = nil
        
        ui?.mStatusBarColor = 0xf000000
        ui?.mToolbarColor =  0xf000000
        ui?.enableBackButton = false
        ui?.useLetterTitleImage = true
        
        ui?.emptyUserListMessage = "NO MESSAGES"
       
        Mesibo.getInstance()?.setUiOptions(ui!)
        navigationController?.navigationItem.setHidesBackButton(true, animated:false)
        navigationController?.pushViewController(MesiboUI.getViewController(navigationController?.delegate), animated: false)

        Mesibo.getInstance()?.addListener(self)
                 
     
     



       
    }
    
 
    override func didMove(toParent parent: UIViewController?) {
        super.didMove(toParent: parent)

        if parent == nil {
            debugPrint("Back Button pressed.")
        }
    }

    private func add(asChildViewController viewController: UIViewController) {
        // Add Child View Controller
        addChild(viewController)

        // Add Child View as Subview
        view.addSubview(viewController.view)

        // Configure Child View
        viewController.view.frame = view.bounds
        viewController.view.autoresizingMask = [.flexibleWidth, .flexibleHeight]

        // Notify Child View Controller
        viewController.didMove(toParent: self)
    }
   
       func mesibo_(onConnectionStatus status: Int32) {
           print("Connection status: %d", status);
   

       }

       func mesibo_(onMessageStatus params: MesiboParams!) {
           print(params ?? "")
      }

       func mesibo_(onMessage params: MesiboParams!, data: Data!) {
           print("data")
          
       }
    
   
    func mesibo_(onMessageFilter params: MesiboParams!, direction: Int32, data: Data!) -> Bool {
           return true
       }
       func mesibo_(onUserProfileUpdated profile: MesiboUserProfile!, action: Int32, refresh: Bool) {
          
           
       }
       
       func mesibo_(onShowProfile parent: Any!, profile: MesiboUserProfile!) {
           
           
       }
    
       func mesibo_(onUpdateUserProfiles profile: MesiboUserProfile!) -> Bool {
            
        return true
           
       }
       
4

1 回答 1

0

您应该为 mesibo UserProfile 设置个人资料图片。如果没有,它将使用字母标题图像

这是代码https://github.com/mesibo/ui-modules-ios/blob/master/Messaging/Messaging/UserListViewController.m#L1149

如您所见,如果找不到缩略图,它会设置一个字母标题图像。

于 2020-07-17T17:58:12.920 回答