loganwright / SimpleChat

An Easy To Use Bubble Chat Interface
Mozilla Public License 2.0
262 stars 53 forks source link

Showing Keyboard #18

Closed jtomaslobo closed 9 years ago

jtomaslobo commented 9 years ago

Hello,

I was trying to show the keyboard by acting over the LGChatController but I couln't find any way.

Could you help me with it?

Thanks Tomás

loganwright commented 9 years ago

Hi @jtomaslobo

I'm not really sure what you mean by acting is that perhaps a typo? The keyboard should activate automatically when the user taps the text entry. Are you saying you want the text entry to activate automatically when it is presented?

Best,

Logan

jtomaslobo commented 9 years ago

Sorry, I meant "interacting with".

Yeah that's right, I'd love to know how to activate it (show it) automatically when the view is presented.

Thanks, Tomás Lobo

loganwright commented 9 years ago

I should probably update it to make that the default behavior, but for now you can just do it manually by replacing this:

    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        self.listenForKeyboardChanges()
    }

With this:

    override func viewWillAppear(animated: Bool) {
        super.viewWillAppear(animated)
        self.listenForKeyboardChanges()
        self.chatInput.textView.becomeFirstResponder()
    }

Let me know if this works for you.

Best,

Logan

jtomaslobo commented 9 years ago

Thanks a lot for the answer.

It works :)

Best Regards, Tomás

loganwright commented 9 years ago

No problem, this is probably expected behavior and I'll add it into the next update!

Best,

Logan