I have an html file that has a <div> and that I am loading into a UIWebView and I need to know how many lines of text are in the div, so I can check that with javascript:
<script>
function countLines() {
var divHeight = document.getElementById('myDiv').offsetHeight;
var lineHeight = parseInt(document.getElementById('myDiv').style.lineHeight);
var lines = divHeight / lineHeight;
alert("Lines: " + lines);
}
</script>
and it does alert the variable "lines"
In Objective-C how can I retrieve this variable from my UIWebView and then use it in my code?
Thankyou!