How to get the HTML tag that is displayed on the UIWebView screen from the entire HTML tag loaded in the UIWebView

In mine UIWebView

I have uploaded the "Chapter.xhtml" file like this.

[webView loadRequest:[NSURLRequest requestWithURL:url]];  

      

and the whole Chapter.xhtml file is loaded into the webView.

I am showing it with some JavaScript logic in a webview.

float pageOffset = pageIndex*webView.bounds.size.width;
NSString* goTo =[NSString stringWithFormat:@"pageScroll(%f)", pageOffset];
[webView stringByEvaluatingJavaScriptFromString:goTo];  

      

With this, a new page will appear when the button is clicked, but manually scrolling the page in the webview.

So, if there are four content pages in the webview, then only one page will appear in the web browser, and when you click Next, a new page will come.

But I need to get all the HTML tags that are visible on the screen. ( only the ones on screen ) and not all the loaded HTML in the webview.

For getting HTML tags I use NSXMLParser and get all tags in method didStartElement

and values ​​in method foundCharacters

.

But I only want to get the tags that are on the screen and after the second page tag, etc ...

Any idea or suggestion would be helpful to me ...

EDIT:
For example, if there are three HTML pages loaded in the webview then only one page is displayed on the screen, and then by adding the height of the webview page *, the next page will be displayed on the screen, but that page was also loaded into the webview is simply not visible on the screen.

So, is there anything that will give me the tags that are on the screen. (or whose values ​​are on the screen)?

+3
javascript html ios uiwebview nsxmlparser


source to share


No one has answered this question yet

See similar questions:

0
Want to get text from UIWebView in any way

or similar:

931
How do I know which DOM element has focus?
6
Loading UIWebView UI
2
Delay loading HTML string in UIWebView
1
blank screen is displayed a few milliseconds before uiwebview displays local HTML page
1
Loading html content into UIWebView - iOS
0
How to load .js file to HTML in UIWebview in Objective-C
0
Retrieving HTML tags from UIWebview using
0
HTML data not loading in UIWebview when there is PassCode screen
0
Want to get text from UIWebView in any way
0
If an instruction in Xcode determines which HTML page is loaded using UIWebView



All Articles
Loading...
X
Show
Funny
Dev
Pics