Hi,
Thanks a lot for your work !
i'm building a tabbed app, which have a message tab.
class TodoViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let childVC = MessagesTodoViewController()
addChildViewController(childVC)
self.view.addSubview(childVC.view)
childVC.didMove(toParentViewController:self)
self.becomeFirstResponder()
}
}
My MessagesTodoViewController follow your quickstart guide.
The MessageInputBar doesn't appear.
Is it the good place to put this code, or am i supposed to put it in the tab bar controller ?
thanks,
nelson
After googling, i find that i need to modify my MessagesTodoViewController :
class MessagesTodoViewController: MessagesViewController {
override func viewDidAppear(_ animated: Bool) {
self.becomeFirstResponder()
}
Question, how did you get the inputaccessory view on top of the tabBar? Currently it is right above the tabbaritems, and when I change viewcontrollers, the inputaccessory disappears.
@arvidurs The MessageInputBar is only part of MessageViewController. You can add one to any view controller you like by overriding the inputAccessoryView and returning one. You also need to call becomeFirstResponder() on the controller.
Sent with GitHawk
i fix this porblem like this :
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
IQKeyboardManager.shared.enable = false
self.becomeFirstResponder()
}
override func viewWillDisappear(_ animated: Bool) {
IQKeyboardManager.shared.enable = true
}
Most helpful comment
After googling, i find that i need to modify my MessagesTodoViewController :