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
Related
If you focus a TextField the system overlays will accompany the onscreen keyboard despite calling SystemChrome.setEnabledSystemUIOverlays([]) before and immediately after the focus change happened. Any way to change that?
For Clarity: I am referring to the onscreen bottom navigation bar that is provided by android when phones have no physical buttons. In flutter, when you tap on a textfield, the onscreen keyboard comes up, and with it this navigation bar is being forced in. I'd like to hide it, because it's sometimes unnecessary.
AFAIK, You can't hide it. This is the default system behavior (you can't change it) to show the navigation bar when on screen keyboard is visible to the user.
It is provided so that the user can press the back button from the navigation bar in order to hide the Keyboard. So, it will stay there forever as long as keyboard is visible to the user.
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
It's only happened on iPad,not in iPhone.
I have a search display controller in my listview, under a titlebar(not navigation bar).
It can be displayed correctly, even I don't set self.edgesForExtendedLayout=UIRectEdgeNone.
The issue is:
When I click in the text field of the searchbar, and then click someplace else to hide the keyboard and end the text input, the searchbar will be shown at the top-left corner of the screen.
p.s.My listview is in the middle of the screen.
In one of my modal view, the search bar is under a navigation bar, there is no such issue. But I must set self.edgesForExtendedLayout=UIRectEdgeNone to show the search bar.
Could you give me a hand please?
Thanks a lot.
It looks like the Safari keyboard works like this on iPads...
If the webpage originally reaches the bottom of the screen, when the keyboard appears it never scrolls past the bottom of the webpage.
If the webpage originally doesn't reach the bottom of the screen and the textfield that has the focus is more than halfway down the screen, it scrolls the webpage so that the current textfield is now halfway down the screen and doesn't care if the area below the original webpage is showing.
Basically I want to have a webpage that doesn't fill the screen vertically and yet I don't want the keyboard to cause the screen to scroll past the bottom of the webpage because that would hide the top part of the webpage and instead show the blank area below the webpage.
In portrait mode on an iPad the following webpage is always showing even when a textfield is active and the keyboard is showing:
http://sky-walker.net/temp/ipad/a
But when you view that webpage in landscape mode and select the bottom textfield, the webpage scrolls so that the bottom textfield is halfway up the screen. I want it to be at the bottom of the screen.
http://sky-walker.net/temp/ipad/b
In landscape mode the previous link fills the entire screen and so if you click on the bottom textfield (after scrolling) the textfield appears at the bottom of the screen when the keyboard is visible rather than the screen scrolling until the textfield is halfway down the screen.
In portrait mode the previous link doesn't originally fill the screen so if you click on the bottom textfield (making the keyboard appear) it scrolls up so that it is halfway up the screen.
http://sky-walker.net/temp/ipad/d
The final link fills the entire screen for portrait mode as well and when the bottom textfield is selected it doesnt scroll past the bottom of the webpage when the keyboard becomes visible.
Maybe what it is doing when the webpage isn't filling the screen is that it is remembering the empty space at the bottom and then it scrolls up (hiding the top) when the keyboard is visible. I want it to forget about the empty space at the bottom when the keyboard appears.
I faced a very similar issue. Here's what I do.
I subscribe to UIKeyboardWillShowNotification to get the keyboard size then when the scroll view scrolls up more than the keyboard height then I set the scroll offset to the keyboard height.
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