iOS and HTML interaction issues

Source: Internet
Author: User

One.

Load the background of the HTML tags, text can be displayed normally but the picture does not show. Find the problem for a long time did not find the place to write wrong, also asked others do not know, and then asked the Android to know, the background passed over the HTML tag, some are escaped. The mobile side does not recognize this side. Only cause the picture not to show. Replacing a string with NSString replaces the transfer of clothes. Just OK.

nsstring * htmlstring = [self. Htmlstring stringbyreplacingoccurrencesofstring:@ "\\\" " withstring:@" \ "" ];

Two.

Picture text Normal display later, the picture of the style and size of the display is not correct, asked the next know is the background is just body, need to splice their own head. Asked the company's H5.

NSString *header =@ ";

self. htmlstring = [nsstring stringwithformat:@ ", header,self. Model. Content];

PS: If you use other labels please see this article http://blog.csdn.net/huang100qi/article/details/42596799

iOS and HTML interaction issues

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.