When setting UIToolBar as inputAccessoryView to UITextField hides the UIToolBar - ios

I have tried one sample from the this link
Actually what i tried is placed an uitextfield and added that toolbar as inputaccessoryview.
When i tap on the uitexfield, it shows the uikeyboard with that toolbar added on top that is ok.
But the toolbar which was showing under the pickervieew is now get hidden after i did the above thing...
Please let me know why is that happening

If you mean your app had a toolbar at the bottom, and the picker view/keyboard/other input view appears on top of this, then this is the expected behaviour.
For example, look at mobile safari, when you enter text in a field on the page (like an SO answer, for example!), the keyboard covers the lower toolbar. Otherwise you'd hit it when typing.

Related

how to change position of a Number Pad?

By default, if you set a UITextField keyboard type to Number Pad when it is displayed, it appears on the bottom of the screen. My problem is, if the controller has a toolbar, they can not appear when the keyboard appears. I want the number pad to appear on above toolbar. Can I change the position of it?
Any ideas?
first
second
No, you're not able to change the position of the system keyboard. You can however put the toolbar on top of the keyboard. There is a property on UIKeyboard that allows this. Look at inputAccessoryView.
You should listen for the various keyboard events, such as UIKeyboardWillShowNotification and adjust the constraints/frame of your toolbar accordingly. This will allow you to place your toolbar wherever you want when the keyboard is shown and dismissed.
Reference: https://developer.apple.com/library/content/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/KeyboardManagement/KeyboardManagement.html

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.

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.

uitextview keyboard appear above uitoolbar

I have a uitoolbar at bottom of my main view. I also have a uitextview at top of my view. when tapped on the textview to start editing I want the keyboard to appear from above the toolbar, not covering the tool bar. I want to know how I can do that also I don't want it to be animated.
I have one more question, when the keyboard appears is it possible to put another view in front of it?
thanks
You can't do the former. The keyboard is in a different window and so doens't interact with the views in your window. Apple doesn't provide any public access to the keyboard window.
As to the latter, putting a view in front of it, you might be able to something like that by creating another window but I've not seen anyone do it and not sure what it would do to the keyboard events, etc.

iPad popover not resizing properly after search keyboard is dismissed

I have a popover that contains a tableview (which is inside a navigation controller) with custom cells and a search bar in the header. Once I enter the search bar the popover shrinks appropriately to make room for the keyboard. Good so far. Once I dismiss the keyboard either by pressing the search button or the dismiss keyboard button, the popover appears to resize a little but does not does return to the full length as I would expect. I've tried all the suggestions to update the popoversize and contentsizeinpopover. They seem to have no effect.
Any thoughts or workarounds?
Thanks,
Rob

Resources