set ipad app background programmatically?
Does anyone know how I can set the background of my webView t开发者_如何学Co the textured background that came with the iPad SDK programatically?
Try this:
webview.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];
Create a UIImageView
which has interaction disabled etc., and fills the whole space and has its autoresize masks set correctly. Then add your UIWebView
on top of it.
Load some custom style into the web view that sets it to this on the body tag. Seems simple enough to me. Of course, as with everything, ensure whichever image you use, you have the rights to use.
精彩评论