Slide UIWebView over a ImageView (like safari) - uiwebview

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!

Related

WKWebView appears above my navigationbar and tabbar

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.

Remove maximise button on iBooks HTML widget

I've added a PNG animation (acting like a animated GIF) to an iBook HTML widget using CSS, JavaScript and HTML.
The problem is that there is a maximize button when hovering over the widget in the iBook preview. I want to remove this because it is only supposed to be an animation that plays when entering the page, and I don't want the user to be able to interact with it.
How can I remove this functionality from the widget?
Setting the widget width and height in your info.plist file the same as the width and height in iBooks author prevents opening in full screen when tapping on it.
I don't know if this logic works on Mac or iPhone, but it seems to work on the iPad.

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()

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)

Background image not showing up for UITableView in UISplitViewController's master view

I have a Xib set up for the Master view in a UISplitViewController. The Xib has a view with two subviews: a subview of a UIImageView (that contains the background image) and a grouped style UITableView. When testing, the image view does not show up as the background of the table view.
The background image shows up correctly using the exact same Xib with the iPhone.
Things I have checked:
Table view's background color is set to Clear Color
Opaque checked or unchecked has no effect (on the UIView, UIImageView, or UITableView)
Setting the Alpha to < 1.0 on the UITableView does start to show the UIImage view behind it
Tested on 3.2 and 4.2
Any ideas on why the UIImage view is not showing up in the background on the iPad (but is okay for the iPhone)?

Resources