MessageKitを使っていて、チャット画面を作っているのですが、他のテキストビューにカーソルが当たるとメッセージ入力画面であるmessageInputBarが消えてしまうという問題が生じました。
それを治す方法のメモ
答えはこちらに。
General Information MessageKit Version: 0.13.3 iOS Version(s): 11 Swift Version: 4.2 Devices/Simulators: iPad Pro 12inch - iOS 11, iPad 10.9 - iOS 10.3 Reproducible in ChatExample? (Yes/No): Yes Wh... Hide messageInputBar after select other TextField · Issue #654 · MessageKit/M... - GitHub |
I believe this is because the UIViewController is no longer the first responder (which is required for an inputAccessoryView and is thus hidden. There isn’t anything we can do about this as we have built the MessageInputBar to be a inputAccessoryView. I would suggest a) not putting a UITextField in the titleView or b) assign a delegate to the UITextField and when the textField ends editing, make the UIViewController the first responder. I am going to close this for now.
どうやら仕様のようで、もどしたかったら対象のUIViewControllerにresponderを戻せと言っている。
ということで以下をやるだけで簡単に入力画面がもどりました
// 他のテキストビューの処理が終わったあとに使ってるViewControllerで以下を発動 self.becomeFirstResponder()
こんにちは。virapture…
View Comments
Your article helped me a lot, is there any more related content? Thanks!
I am a website designer. Recently, I am designing a website template about gate.io. The boss's requirements are very strange, which makes me very difficult. I have consulted many websites, and later I discovered your blog, which is the style I hope to need. thank you very much. Would you allow me to use your blog style as a reference? thank you!
Your point of view caught my eye and was very interesting. Thanks. I have a question for you. https://accounts.binance.com/id/register?ref=OMM3XK51
Thanks for sharing. I read many of your blog posts, cool, your blog is very good. https://www.binance.info/join?ref=B4EPR6J0
Your article helped me a lot, is there any more related content? Thanks!