UIWebView scrolls under navigation bar for text inputs - ios

I have a UINavigationController with an UIViewController in its stack. This view controller only shows one UIWebView that extends nicely under the UINavBar und UITabBar I have in my app. Great! Now if I tap an textarea input in this web view and the iPhone/iPad is in a landscape orientation the web view scrolls to a position where the cursor in that textarea is under the nav bar and so the user can't see what she is typing.
How can I fix this? Is this an iOS 8 bug or do I need to set a scroll inset manually for this?
Bests,
Philip

OK it helps to set a contentInset to the scroll view (for me it was heightOfBar + heightOfStatusBar) if the keyboard shows and remove it again if the keyboard hides

Related

Navigation bar prompt & height resize animation

Good day!
I have an embedded navigation bar in my app.
mainView is a ViewController with tableView in it.
On first launch there is no prompt text on navigation bar. When you get to options (second view controller) you can set a text to your main views prompt. So after you do so, returning from "Options" to mainView triggers nice and smooth animation on navigation bar increasing its height and prompt text appears.
When i launch the app for the second time, where prompt text is loaded, the text is ok, the size is ok, but the animations of height resize start to get glitchy when switching views, navigation bar height jumps from big to small w/o animation, although text appears to dissolve as usual.
Here is an example of where i switch views in a loaded app:
If i go to options view controller and again set the prompt text -> animation of height increase between views gets fine.
I'm sure i am missing something at launch, something like tableView.reloadData() in viewDidLoad, but for navigation bar.

Navigation Bar Hidden on Rotation When Keyboard Showing

I have a webview in my application. When the user brings up the keyboard to type into a text field and then rotates the screen the navigation bar scrolls up the screen as well as the text field in question, obscuring the status bar. Not only that but the screen auto scrolls back to that default position when you try to scroll up in the web view.
Any help on fixing this issue?
Thanks

uisearchdisplaycontroller when search text is being typed in pushes navigationBar

I am using iOS7 on iPad project. In my controllers main view I have 2 subviews. In one of the subviews I placed a tableview and above it a search bar and a button. When I click on the search bar to enter text it grows by about 20 px pushing navigation bar up. Can't figure out why it is doing so. Any help appreciated. Thanks

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

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