webview能透明,看到下层的东西
@implementation ViewController
- (UIWebView *)webViews{
if (_webViews == nil) {
self.webViews = [[UIWebView alloc] init];
self.webViews.backgroundColor = [UIColor clearColor];
self.webViews.opaque = NO;(不用透明默认为yes)
self.webViews.frame = CGRectMake(0, 250, 300, 200);
}
return _webViews;
}
- (void)viewDidLoad {
[super viewDidLoad];
[self.view setBackgroundColor:[UIColor whiteColor]];
// Do any additional setup after loading the view, typically from a nib.
UILabel * label = [[UILabel alloc] init];
// label.frame = CGRectMake(100, 100, 200, 50);
label.text = @"《自在独行》内容简介: