0

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.

4

1 回答 1

0

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!

于 2013-03-30T14:39:56.973 回答