WKWebView appears above my navigationbar and tabbar - wkwebview

I have a viewcontroller that will include a WKWebView. My viewcontroller is inside both a navigationcontroller and tabbarcontroller. The WKWebView appears over both of these, hiding the tabs (on the bottom), and the title and back button (on the top), and they only appear when you scroll up or down. How do I fix this.

Found it. Changed the webview's scrollview backgroundColor.

Related

dark grey layer appears on the top of my webview with navigation controller

I've a UIWebView. Everything is fine if I don't add navigation controller. But If I add, a dark grey layer on the top of my uiwebview appears. I don't understand what is wrong, I'm just adding a uiwebview and haven't written a line of code about sizing or layout.
http://i.stack.imgur.com/KRTuU.png
This is probably because your navigation bar's translucent property is set to YES. Set it to NO and the dark grey background will go away.
You can hide that navigation bar by adding this:
self.navigationController?.isNavigationBarHidden = true
to the view controller's ViewDidLoad()

Slide UIWebView over a ImageView (like safari)

I think the title says everything about my problem.
The ImageView is not in the UIWebView.
I want that the ImageView is pushed up by the WebView.
It's actually pretty simple. If you go into your storyboard (or nib) and choose the the webView and choose a color for it's background property, anytime you scroll above the view that background color would appear. So all you need to do is load an image for that background color.
In your viewDidLoad method, place this bit of code:
self.webView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:#"background.png"]];
and where it says background.png
just put the image name that you loaded into your project.
Hope this helps!

Enable mouse scroll in flipview children

In my WinJS application, I use a flipview, with a Listview inside it.
The listview as a long content, so it is scrollable : the scrollbar is visible, I can scroll with the finger on a touch screen, but the mouse wheel doesn't work.
After looking at the flipview source code, I added the win-interactive class on my listview, and now I can use the mouse wheel to scroll, but the problem is that the scroll also applies to the flipview container : the mouse scroll directly between the different flipview items.
Is there a way to enable the scroll on the listview, without modifying the flipview behavior ?
Yes there is, you can subscribe to the mousewheel event being fired in your ListView and stopPropagation() from there to the FlipView.

How to stop view resizing after unhiding the NavigationBar

I have a view with a UITabBar and the navigation bar is initially hidden. When I press the next tab I want the nav bar to be shown, but when I do this using setNavigationBarHidden: the view gets resized, and the tabbar is pushed out of the screen. How do I setup the views to where they won't get resized? Or get resized properly?
You will have to check your autoresizingMasks. You can adjust them programmatically or via IB. Autosizing is available in the Size Inspector on the right.
You will mostly have to change the tab bar's mask to fix it to bottom and left. Rest of the subviews will have to be handled as needed.
[self.navigationController setNavigationBarHidden:NO animated:NO];
or
after that
set urview frame to exactly for 44reduce(which is navingation bar height) from height.

SplitViewController - can one change the z-order of rootview and detailview?

In an iPad splitview app I am animating changes to the subview of the detailview by moving the views from left to right.
If the app starts in Landscape then when a view is animated to the left it goes underneath the rootview or left view. However if the iPad is rotated to Portrait and then back to Landscape then when a subview moves left it is over the top of the rootview.
What options do I have to either bring the rootview to the front or send the subviews of the detailview side backwards?
Sometimes if you ask a question you then work out the answer and I have. I did not think bringtofront would work but it does.
[_splitViewController.view bringSubviewToFront:[[_splitViewController.viewControllers objectAtIndex:0] view]];
(added once I could answer my own question)

Resources