开发者

set ipad app background programmatically?

开发者 https://www.devze.com 2023-01-08 13:27 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消