美文网首页
iOS中转义字符的使用

iOS中转义字符的使用

作者: 陌上北辰 | 来源:发表于2017-05-25 09:40 被阅读155次

    现在我有一需求,把获取到的网络图片拼接到获取的html字符串中,使网络图片能在webview上显示,需拼接在html字符串中:
    @""添加你的string""

    NSString *image = [NSString stringWithFormat:@"\"http://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\""];

        html = [NSString stringWithFormat:@"<body><img src = %@/> <h4 >%@</h4> <p>%@<p></body>",image,title,body];`

    相关文章

      网友评论

          本文标题:iOS中转义字符的使用

          本文链接:https://www.haomeiwen.com/subject/izpaxxtx.html