tunesjnr.blogg.se

Swift key board
Swift key board












swift key board

We can get the frame of the keyboard by accessing the key UIResponder.keyboardFrameEndUserInfoKey from the userInfo dictionary of the notification. The notification contains information of the keyboard such as the size of they keyboard, which you can use to calculate how much distance should the view move upward. Right before a keyboard is shown on the screen, iOS will send a notification named UIResponder.keyboardWillShowNotification to your current active UIResponder (can be your view or view controller).

swift key board

Most likely you have worked on an app with multiple textfields, and when the keyboard show up, there's a chance that your text field will get covered by the keyboard! One solution for this is to move the view up when a keyboard is presented. Just want the code to scroll the scrollview up?














Swift key board