I have a UIScrollView
added to a UIView. Now i have added a background image to the scrollVIew.
The image has a fixed size like 320X460. But when the scroll view scrolls further down i can see white colour areas on the scroll view.
How could i prevent this ?
I tried adding the image to the view, and making the scrollview background as clearColor, but it doesn't work.
[scrollView addSubView:imageView];
self.view = scrollview;
[scrollview setBackgroundColor:[UIColor clearColor]];
Try setting a tileable image as your background color.
scrollView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"tileableImage.png"]];
If you don't want to tile an image, insert the image view:
[webView insertSubview:backgroundImage atIndex:0];
Then set it's size to match the webView at creation or in viewWillLayoutSubviews.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With