How to make keyboard stay fixed to UIViewController - ios

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

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!

UIButtons initially non-functional when positioned on the right-hand side of a view

All:
I am working on an app in which I have multiple UIButtons and UITextFields on the top and right hand side of a UIView. The UIViewController is embedded in a tab bar controller, and I'm using iOS 7.
When the view first appears, the UIButtons and UITextFields on the right are unresponsive -- they are enabled (according to .isEnabled), but the buttons don't flash, and the keyboard doesn't appear when I tap on the UITextField. If I switch to another tab and then back, they work.
The controls at the top work as expected.
However, if I drag the right hand side controls more towards the center of the app, they work first time. There's like a 100 pixel "dead zone" that only goes away when I switch tabs.
Update: If I bypass the tab bar controller completely, and make the view controller associated with the above the initial view controller, then the controls work as they should.
What is going on??
Thanks,
Michael

Present UIPopoverController from a moving rect

Just got this weird problem, where I have a scroll view and buttons in the scroll view. I want to display a UIPopover from the button when touched, with UITextFields inside the UIPopover. The problem comes when the Keyboard appears. In certain cases, when the UIButton is so high in the view that the popover can only be displayed under it with the UIPopoverArrowDirectionUp, and when keyboard pops in, this popover cannot move any more up and therefore magically disappears to the top left corner (probably some Apple thing).
My solution is to check the frame of the UIPopover and to check that there is enough space for the keyboard, and if not, scroll the UIScrollView up with the buttons as well in order to be able to push the UIPopover up and so make sure that both the Keyboard and the popover fit.
So the question is: Is it possible to move the popover as the button moves?
Thanks

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.

Resources