I am building a chat application and I have a UIViewController that contains a UITableView. I have a custom view that contains an autoexpanding UITextView and used it to override the inputAccessoryView in my view controller. The tableview has keyboardDismissMode as interactive. When I am trying to drag the keyboard up/down, I want to get the event so I can either update my tableview's bottom constraint or update my tableview's content inset. The notifications for keyboardWillShowNotification nad keyboardWillHideNotification only gives me the notification when the keyboard has finished showing and hiding. I need something that can notify me while the user is dragging the keyboard up/down. Just like how WhatsApp have in their chat screen.
Related
How can a custom subview be added to the iOS keyboard for an app, not global using the custom keyboard?
I would like to add functionality to the keyboard in an app, such as stickers and an additional subview in between the text input area and the top of the key subview.
Should a new keyboard be created from scratch? Or can the keyboard be extended?
How are the custom subviews hooked up to a controller for handling? E.g. facebook or viber have stickers that can be selected, how are these subviews managed and connected to the VC?
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?
Enter Account Number and Enter Branch Id Textfields are working well at portrait mode when keyboard is appearing.I dissmiss it in Verify button as i don't get return key at Number pad.i do it programmatically.
But in landscape mode the keyboard is hidding my TextFields.What to do now?Any help is a blessing.
This is a common problem, you can easily manage also. If the text fields are within the table view you can scroll the table view when the keyboard appears, if not you should embed the all the controls within a scroll view and scroll it. Use the keyboard notification to detect keyboard appearance and dismissal.
Basically, you register to receive the UIKeyboardWillShowNotification and the UIKeyboardWillHideNotification, then you manually scroll the view to compensate.
pls refer this link
Making a UITableView scroll when text field is selected
I added the AdBannerView and toolbar to my IOS drag and drop from object library i get problem because it is on fixed position under my UIwebview when I click on my webview to type it will cover AdBannerView just I want to ask how can I fix the problem
the keyboard cover the AdBannerView and toolbar
Can you listen to the UIKeyboardDidShowNotification notification, and resize the view or move the adbanner view accordingly.
see how to do that in the following question:
How to detect when keyboard is shown and hidden
I have created a table view controller sort of a master-detail approach, when I click on the master view the detail view would come out with a textfield at the bottom of the screen contained within a view on a toolbar.
My question is how can I automatically adjust the position of the toolbar when the keyboard pops-out when I clicked on the textfield, currently when I enter on the textfield the keyboard comes out covering my textfield.
If you want to avoid the keyboard covers your textfield check this question and answers
iPhone Keyboard Covers UITextField
If you have more than a textfield, consider using a scrollview and move up when the keyboard appears.