In my app, I am opening an URL in an UIWebView. I wanna change the height of a particular component. The source of the page has,
<div class="main-container scrollable animated animated-fast transparent fadeIn" ng-class="{fadeIn:done}"><-></div>
I want to change the css height property of <div class="main-container scrollable animated animated-fast transparent fadeIn" ng-class="{fadeIn:done}">. How do I access that in swift?
I tried,
webView.stringByEvaluatingJavaScriptFromString("document.getElementsByClassName('main-container scrollable animated animated-fast transparent fadeIn')[0].css('height', '100%');")
But not successful.
Aucun commentaire:
Enregistrer un commentaire