如何将黑/灰色更改为白色?
这只是一个简单的视图,UIView连接到UIViewControllers属性,同时带有填充UIView的webview.
UPDATE
这是有效的代码:
- (void)loadView {
UIWebView *webview = [[UIWebView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 416.0f)];
[webView setBackgroundColor:[UIColor whiteColor]];
self.view = webView;
[webview release];
}
Run Code Online (Sandbox Code Playgroud)
提前致谢.

Joh*_*ker 11
您可以使用UIScrollView的backgroundColor属性来实现此目的,签名为:
@property(nonatomic, copy) UIColor *backgroundColor
Run Code Online (Sandbox Code Playgroud)
因此,要将其更改为白色,您将使用:
[myScrollView setBackgroundColor:[UIColor whiteColor]];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
13340 次 |
| 最近记录: |