简体   繁体   English

以编程方式设置ipad app后台?

[英]set ipad app background programmatically?

有谁知道如何以编程方式将我的webView背景设置为iPad SDK附带的带纹理背景?

试试这个:

webview.backgroundColor = [UIColor scrollViewTexturedBackgroundColor];

Create a UIImageView which has interaction disabled etc., and fills the whole space and has its autoresize masks set correctly. 创建一个禁用了交互等的UIImageView ,并填充整个空间并正确设置其自动调整大小的掩码。 Then add your UIWebView on top of it. 然后在其上添加UIWebView

Load some custom style into the web view that sets it to this on the body tag. 将一些自定义样式加载到Web视图中,并在body标记上将其设置为此样式。 Seems simple enough to me. 对我来说似乎很简单。 Of course, as with everything, ensure whichever image you use, you have the rights to use. 当然,与所有内容一样,确保您使用的图像,您有权使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM