2018-06-14

2018-06-14  本文已影响8人  zhengchengxia

webview加载时会遇到的问题

if([self.byWay isEqualToString:@"stringByReplacing"]){

        self.strUrl = [self.strUrl stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

    }else if([self.byWay isEqualToString:@"chatVc"] || [self.byWay isEqualToString:@"notChatVc"] || [self.byWay isEqualToString:@"showPage"]){

        self.strUrl = (NSString *)CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (CFStringRef)self.strUrl, (CFStringRef)@"!NULL,'()*+,-./:;=?@_~%#[]", NULL, kCFStringEncodingUTF8));

    }else{

        self.strUrl = [self.strUrl stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

    }

上一篇 下一篇

猜你喜欢

热点阅读