zoukankan      html  css  js  c++  java
  • web使用

    contentWeb =  [[UIWebViewalloc] initWithFrame:CGRectMake(10, 0, 300, 135)];

            contentWeb.layer.cornerRadius = 8;

            contentWeb.layer.masksToBounds = YES;

            contentWeb.dataDetectorTypes = UIDataDetectorTypeNone;//去掉下划线

    //        contentView.scalesPageToFit = YES;

            contentWeb.backgroundColor = [UIColorclearColor];

            [self addSubview:contentWeb];

            contentWeb.hidden = YES;

            UIScrollView *scroller = [contentWeb.subviews objectAtIndex:0];//去掉上下阴影

            if (scroller) {

                for (UIView *v in [scroller subviews]) {

                    if ([v isKindOfClass:[UIImageView class]]) {

                        [v removeFromSuperview];

                        }

                   }

            }

    - (BOOL)webView:(UIWebView *)webViewLocal shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 

    {

    NSString *myURL = [[request URL] absoluteString];

        //    NSLog(@"%@", myURL);//进来时:about:blank  http://www.baidu.com/

        if([myURL hasPrefix:@"http:"])

    {

            //        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:(NSString *)[myURL substringFromIndex:[@"http:" length]]]];

            [[UIApplication sharedApplication] openURL:[NSURL URLWithString:myURL]];

            return NO;

        }

    return YES;

    }

  • 相关阅读:
    机器学习
    机器学习
    JavaWeb之tomcat安装、配置与使用(一)
    Tomcat安装、配置和部署笔记
    Java配置----JDK开发环境搭建及环境变量配置
    安装SQL2012
    SQLServer 数据库变成单个用户后无法访问问题的解决方法
    临时记录
    SQL Server 动态生成数据库所有表Insert语句
    SQL2000查看表的大小
  • 原文地址:https://www.cnblogs.com/swallow37/p/2845479.html
Copyright © 2011-2022 走看看