search

Home  >  Q&A  >  body text

swift - ios keyboard appears or disappears problem

The desired effect is that when the keyboard appears, the buttons and labels at the bottom will automatically move up and be above the keyboard. When the keyboard disappears, the buttons and labels will automatically return to the bottom.

I use the method of adding scrollView and then monitor the status of the keyboard, but the problem I encounter is: when the keyboard disappears, the button and label are indeed at the bottom, but when the keyboard appears, the button and label will be replaced by the keyboard. Cover. Is there any way to solve this problem? Thank you

过去多啦不再A梦过去多啦不再A梦2806 days ago937

reply all(1)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-06-06 09:55:33

    If the button and label are on the scrollView, then the scrollView scrolls up by the height of the keyboard

    reply
    0
  • Cancelreply