首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Mesibo联系占位符问题ios快速

Mesibo联系占位符问题ios快速
EN

Stack Overflow用户
提问于 2020-07-18 01:03:13
回答 1查看 119关注 0票数 0

我已经在flutter框架中集成了mesibo chat sdk,一切运行正常,但在启用useLetterTitleImage = true后无法显示联系人信件图像。有没有人能说出android为联系人图像添加了什么功能,它正在工作,但在ios上遇到了问题,我是sharig文件和屏幕截图

代码:

代码语言:javascript
复制
             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
           
       }
EN

回答 1

Stack Overflow用户

发布于 2020-07-18 01:58:13

你应该为mesibo UserProfile设置一个头像。如果不是,它将使用字母标题图像

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

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62958639

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档