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;

    }

  • 相关阅读:
    《人月神话》读后感第一篇
    MD5+Salt值
    java第十三周测试记录
    今天的问题上上周考试也遇到了,解决方案在文章中。
    Jsp俩大内置对象学习
    十二周周四学术交流会报告
    web界面直连MySql数据库
    抽象类的知识
    isinstance与type的区别
    三级菜单
  • 原文地址:https://www.cnblogs.com/swallow37/p/2845479.html
Copyright © 2011-2022 走看看