UIKeyboardTypeNumberPad hides bottom of view - ios

Newbie alert...
I'm updating some code that has a UITextField with a keyboardType of UIKeyboardTypeNumberPad. In the view, which is in a UIScrollView, there is also a save and cancel button below the textfield. When you tap the textfield, the cancel button is not visible and you cannot scroll to it.
Is there a typical approach for this scenario to make the cancel button accessible when the keyboard pops up?
Is the idea to just manually increase the UIScrollView content size when the keyboard displays and then decrease it when it is dismissed or is there a simpler way of achieving this?

Related

How to scroll within a ScrollView while keyboard is present?

I have a ScrollView and two buttons, one is at the top of the view and the second one is set lower than the height of the keyboard. By changing the inset, I now have the ScrollView move up once the second button is pressed and the keyboard is shown. However, after I press the second button and the keyboard moves the ScrollView up, I want to scroll the view up with a touch to be able to see the first button (without closing the keyboard). But whenever I try to pull it up the keyboard disappears. Any thoughts?

how to always show TextView text above keyboard in swift?

I have a Textview that's covered partially by the keyboard when it shows. As a result, the text which entered into the space covered by the keyboard can not be seen as it is typed.
How do I make the TextView scroll up when the entered text reached the space covered by the keyboard?
I have scroll enabled on the TextView but since all the text is visible on the screen , the vertical scroll bar is not visible. Can I have the vertical scroll bar visible at all time event when editing?
Best solution use IQKeyboardManager
library.
IQKeyboardManager works on all orientations, and with the toolbar.
There are also nice optional features allowing you to customize the
distance from the text field, add the next/previous done button as a
keyboard UIToolbar, play sounds when the user navigations through the
form and more.

iOS keyboard appearance messing up other view

I have UITextField, UIButton and UIImageView inside my view. On viewDidLoad I am animating (moving up) button and image and setting them on some specific position. But when user taps on a textfield to edit it, as the keyboard appears the button and image move back to their original positions.
I don't want any view to move back after my animation finishes. The keyboard appearance is messing up my views. Why its happening or how can I prevent it from happening?

UITextField and Button as TabBar

I want to add UITextField and Button as this picture. I think that its position is fixed and It will scroll up when keyboard appeared. I'm wondering it's kind of tableFooterView or what else?
This is a UITextField input accessory view.
It has nothing to do with UITabBar or table view, just a plain old UIView put on top of each and every other view.
When UITextField on the view becomes firstResponder, you should put it over the keyboard and vice a versa.
UITableViewFooter is not an option here - at least look at Facebook or Instagram, it's done differently there.

Disable UIScrollView when UIActionSheet is displayed

Is there anyway to disable the scrolling when the button for UIActionSheet is pressed?
My app uses horizontal scrolling to access different pages. I also have a bar button item which when pressed calls the UIActionSheet with different options for the user (saving, sharing, etc). But, the user can still horizontally scroll to the next page. Is there a way prevent this such that when the bar button is pressed, the scrolling is disabled?
UIScrollView inherits the userInteractionEnabled property from UIView. Set that to NO when the action sheet is shown (and back to YES when it's dismissed).

Resources