Skip to content

MessageInputBar not showing when MessagesViewController subclass used as ChildViewController #737

@VadimPlasiciuc

Description

@VadimPlasiciuc

MessageKit Version: 1.0.0
Swift Version: 4.1
Test Device: iPad 12.9(inch)

When adding messageViewController on container view(red color background), seems like inputAccesoryView doesn't show.

screen shot 2018-06-22 at 13 56 55

I tried to use becomFirstResponder in viewdidAppear but the inputAccesoryView seems to take width of the parentViewController (here you can see the code):

override func viewDidLoad() {
    super.viewDidLoad()
    setupNavigationBar(actionsTarget: self)
    setupLocalization()
    
    viewController = ChatViewController()
    addChildViewController(viewController!)
    viewController?.view.frame = containerView.bounds
    containerView.addSubview((viewController?.view)!)
    viewController?.didMove(toParentViewController: self)
     
  }
  
  override func viewDidAppear(_ animated: Bool) {
    super.viewDidAppear(animated)
    viewController?.becomeFirstResponder()
  }

screen shot 2018-06-22 at 13 57 34

Is there a way to make inputAccesoryView to be same width as containerView ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions