This text address: http://www.cnblogs.com/qianLL/p/6095988.html
Sometimes when we receive the data, we give the data room a string of HTML strings, but we're going to show it. This is what we will find the text can be self-adapting, but some pictures are not adaptive size
This is what we need to modify the IMG CSS style
But we add a style to control all the IMG tags yes, but if this
All this is what we need to replace the style in the IMG tag
The specific code is as follows
Adaptive size + (NSString *) Autowebautoimagesize: (NSString *) html{ NSString * regexpstr = @ "[mutarray addobject:group1]; } Nsuinteger len = [Mutarray count]; for (int i = 0; i < len; + + i) { html = [html Stringbyreplacingoccurrencesofstring:mutarray[i] withstring: @ "style =\ "width:90%; Height:auto;\ ""]; } return HTML;}
Picture Adaptive size in IOS HTML string