开发者

calculate text for a height, paginate the content

HI

I am trying to paginate the content of UIWebview so i disabled the scroll then the second page will the current view height.

The problem is sometimes the last line of page gets clipped so the first line of the next page too.I want a solution for this situation, if it occurs,it should left the line for the next page OR Is there any solution that calculate the amount of text properly visible within a space OR any other technique to do paginat开发者_如何学编程ion . Any sort of help would be highly appreciated.

Thanks


On "webViewDidFinishLoad:(UIWebView *)webView", you can get the height of document by this

int height = [[webView stringByEvaluatingJavaScriptFromString:@"document.documentElement.clientHeight;"] intValue]; 

Then you can readjust your UIWebView frame

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜