zoukankan      html  css  js  c++  java
  • UIWebView

            UIWebView *view = [[UIWebView alloc] initWithFrame:kScreenBounds];

            [view setUserInteractionEnabled:YES];

            [view setScalesPageToFit:YES];

            [self.view addSubview:view];

            

            NSURL *url = [NSURL URLWithString:@"http://www.baidu.com"];

            [view loadRequest:[NSURLRequest requestWithURL:url]];

     

     

    //2.加载本地文件资源
       /* NSURL *url = [NSURL fileURLWithPath:filePath];
      NSURLRequest *request = [NSURLRequest requestWithURL:url];
      [webView loadRequest:request];*/
      //3.读入一个HTML,直接写入一个HTML代码
      //NSString *htmlPath = [[[NSBundle mainBundle]bundlePath]stringByAppendingString:@"webapp/loadar.html"];
      //NSString *htmlString = [NSString stringWithContentsOfURL:htmlPath encoding:NSUTF8StringEncoding error:NULL];
      //[webView loadHTMLString:htmlString baseURL:[NSURL fileURLWithPath:htmlPath]];
      
      opaqueView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
      activityIndicatorView = [[UIActivityIndicatorView alloc]initWithFrame:CGRectMake(0, 0, 320, 480)];
      [activityIndicatorView setCenter:opaqueView.center];
      [activityIndicatorView setActivityIndicatorViewStyle:UIActivityIndicatorViewStyleWhite];
      [opaqueView setBackgroundColor:[UIColor blackColor]];
      [opaqueView setAlpha:0.6];
      [self.view addSubview:opaqueView];
      [opaqueView addSubview:activityIndicatorView];
  • 相关阅读:
    MapReduce之多个Job串联的案例
    MapReduce之MapJoin案例
    MapReduce之ReduceJoin案例
    PPP协议实现透明传输的2种方法
    Mcal使用记录
    RTA-OS使用记录
    RLM的license管理工具的特点
    对license要求比较严格的软件
    自己的文件上传到npm
    Tomcat服务器安装SSL证书>安装PFX格式证书
  • 原文地址:https://www.cnblogs.com/tom2015010203/p/5358653.html
Copyright © 2011-2022 走看看