Using a textView and ScrollView in the same ViewController does not work? Swift

I am having a very strange problem.

I have a tableView, which when the cell is clicked it segues to the next VC, sending the data from that cell with it via prepareForSegue function. From the next VC I then segue from there to another VC (again passing the data needed via prepareForSegue). The final VC is a chat style VC, so it contains a scrollView and a textView, the three VCs look like so: enter image description here

In the chatViewController I have set up a Parse backend so it queries the data and then places inside the scrollView like so:

enter image description here

The problem I am having is that the keyboard does not pop open. I know the code is CORRECT! As it pops open when I make the chatViewController the initial VC. it just doesn't work when it is segued to from multiple VC.

Does anybody have any ideas on this or ever had any problems with segueing into a scrollViewController. I've tried everything I can think off.

Thanks in advance.


ANSWERS:


If you're on ios simulator, the software keyboard may be turned off. For actual emulation you may try a ios phone instead of simulator.

If you wanna appear the soft-keypad in simulator try following

solution

  • iOS Simulator -> Hardware -> Keyboard
  • Uncheck "Connect Hardware Keyboard" Mine was checked because I was using my mac keyboard, but if you make sure it is unchecked the iPhone keyboard will always come up.

solution is actually copied from here



 MORE:


 ? How to adjust the height of a textview to his content in SWIFT?
 ? How to dynamically adjust height of UITextView
 ? Get number of lines in UITextView without contentSize.height
 ? Get number of lines in UITextView without contentSize.height
 ? Get number of lines in UITextView without contentSize.height
 ? Background Image for UITextView
 ? iOS7 UITextView contentsize.height alternative
 ? Get number of lines UITextView without using "\n"?
 ? UITextView does not update its height after trying to change its height programmatically
 ? UITextView Font Size