uitextview keyboard appear above uitoolbar - ios

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.

Related

Show the keypad in a storyboard and set constraints relative to it?

Is there a way of showing the keypad entry within a storyboard? I'd like to have it displayed so I can see in the storyboard what the whole view controller layout will look like when the keypad is displayed.
If it is possible, then is it possible to set a constraint relative to its top edge?
You can’t do that, because the keypad (the virtual keyboard, I assume) is not within your view, your window, or even your app.
You can of course pin things to a view that shadows the frame of the keyboard when it appears. But that is not the best way to respond to the keyboard.

How to show stickers (or other views) under UIInputAccessoryView on iOS?

I'm building a chat interface and I'm curious how apps like Telegram and iMessage achieve the following:
There's an always-on input bar that stays above the keyboard (or at the bottom of the screen if there's no keyboard). This is most likely a UIInputAccessoryView, and I've got this implemented.
There's a sticker button on the bar that, when tapped, dismisses the keyboard AND keeps the input bar in-place AND reveals another view under it that is some other view (containing stickers, etc.) The input bar basically doesn't move at all. The animation is exactly like the keyboard going away, revealing the view that appears to have always been there.
If the keyboard is hidden, tapping on the sticker button does the same as 2. What's really cool is that the sticker view is always the same height as the keyboard - and note that keyboards of different languages can be of different height (autocomplete bar), and at least in Telegram's case it can always find the right height.
Any pointer to how to achieve this is appreciated!

Can I have UIView shown at bottom of the screen and keyboard presented on top of it when needed?

I would like to have either custom UIView or UIToolbar or inputAccessoryView always visible at the bottom of the screen and not being covered by keyboard when one is presented.
Also keyboard should be visible, meaning it should be presented on top of that view and dismissed accordingly.
It would be nice to have that view as part of the UIViewController, but if it can be part of keyboard it is also acceptable as I have an idea how to achieve the visual impression of it being a part of UIViewController and always visible.
I've run into answers explaining how to add custom toolbar docked at the bottom and shown on top of keyboard once presented.
I've also run into posts explaining how to create a custom keyboard.
There are also some stating keyboard can't be positioned otherwise than docked at the bottom.
I understand if Apple is forcing consistency, but having that view always visible would keep consistency across my app. Therefore, if the final answer is it's not possible, I would appreciate firm explanation or link to apple's mention of this issue, cause I wasn't able to find one so far.
Thanks a lot!

How to fix the position of a UIPopoverController?

I have a UIPopoverController and a UITextfield embedded in it. When I tap the text field, the keyboard pops up and my popover controller shift up a bit to make space for the keyboard. But I want my popover to stay in the same position no matter if the keyboard is present. How can I do this?
The Apple popover controller adjusts itself to appear above the keyboard, and you cannot change this behavior. You only options is to either roll your own implementation or use an open-source popover implementation.

How to make keyboard stay fixed to UIViewController

I'm using JASidePanels to have a slideout-menu in my app. One of the views I have has a always-visible keyboard. My problem is that, when in this keyboard-fixed view, and I show the menu, the keyboard stays at the center of my window instead of following the view i hid to show the menu. I understand why this is, but I would like to tweak it so it follows the view im swiping to the right, instead of staying in the middle.
TL;DR how can I stick a keyboard fixed to a UIView, instead of staying in front of whole app window

Resources