zoukankan      html  css  js  c++  java
  • 遇到的一些奇葩问题

    1.字符串直接赋值在block中不能用

     lHtml1=[NSString stringWithFormat:@"%@%@: %@",self.appNameString,self.titleLabel.text,self.urlString];

    要给其分配地址才行

     lHtml1 = [[NSString alloc]initWithString:[NSString stringWithFormat:@"%@%@: %@",self.appNameString,self.titleLabel.text,self.urlString]];

    2.webView直接用地址请求有时候有用有时候又不行

     [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.urlString]]];

    换一种形式可行

     NSMutableURLRequest* req=[NSMutableURLRequest requestWithURL:[NSURL URLWithString:self.urlStringcachePolicy:NSURLRequestReloadIgnoringCacheData timeoutInterval:10000];

      [req setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData];

        [webView loadRequest:req];

  • 相关阅读:
    Java学习
    Java学习
    Java学习
    Java学习
    Java学习
    Java学习
    Java学习
    springboot之RabbitMQ
    IIS自动发布脚本
    存储器
  • 原文地址:https://www.cnblogs.com/YuFly-lyx/p/5844800.html
Copyright © 2011-2022 走看看