iphone - Increasing the font size of a webview conflict with UIScrollView -
i have uiwebview inside uiscrollview. using code increase font size of uiwebview:
int fontsize = 150; nsstring *jsstring = [[nsstring alloc] initwithformat:@"document.getelementsbytagname('body')[0].style.webkittextsizeadjust= '%d%%'", fontsize]; [labelnewscontent stringbyevaluatingjavascriptfromstring:jsstring]; nsstring *size = [labelnewcontent stringbyevaluatingjavascriptfromstring:@"return math.max( \ document.body.scrollheight, document.documentelement.scrollheight, \ document.body.offsetheight, document.documentelement.offsetheight, \ document.body.clientheight, document.documentelement.clientheight \ );"]; scrollview.contentsize = cgsizemake(scrollview.contentsize.width, [size floatvalue]);
the font increase happens without errors half of text inside uiwebview visible.
Comments
Post a Comment