I have UIWebView loaded with html in my iPad Program. By using -webkit-column-width, I divided the html with several columns.
padding: 0px
height: 1024px
-webkit
Because having to include jQuery just for this sucks:
- (CGRect)positionOfElementWithId:(NSString *)elementID {
NSString *js = @"function f(){ var r = document.getElementById('%@').getBoundingClientRect(); return '{{'+r.left+','+r.top+'},{'+r.width+','+r.height+'}}'; } f();";
NSString *result = [self.webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:js, elementID]];
CGRect rect = CGRectFromString(result);
return rect;
}