码迷,mamicode.com
首页 > Web开发 > 详细

UIWebView控件

时间:2015-10-30 18:35:33      阅读:174      评论:0      收藏:0      [点我收藏+]

标签:

#import "RootViewController.h"

 

@interface RootViewController ()

 

@end

 

@implementation RootViewController

 - (void)viewDidLoad {

    [super viewDidLoad];

    NSString *filePath = [[NSBundle mainBundle] pathForResource:@"动画" ofType:@"gif"];

    NSData *gif = [NSData dataWithContentsOfFile:filePath];

    UIWebView *webViewBG = [[UIWebView alloc] initWithFrame:self.view.frame];

    [webViewBG loadData:gif MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];

   // [webViewBG loadData:gif MIMEType:@"image/gif" textEncodingName:nil baseURL:nil];

    

    webViewBG.userInteractionEnabled = NO;

    

    [self.view addSubview:webViewBG];

    UIView *filter = [[UIView alloc] initWithFrame:self.view.frame];

    

    filter.backgroundColor = [UIColor blackColor];

    

    filter.alpha = 0.05;

    

    [self.view addSubview:filter];

}

 

UIWebView控件

标签:

原文地址:http://www.cnblogs.com/hsxblog/p/4923880.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!