Pregunta

I've done a decent bit of research on this but can't seem to find a definitive answer or implement it correctly. I'm currently building an iOS app that contains a UIWebView that loads a webpage. However, rather than displaying the whole webpage I'd like to just extract a certain element from it (in this case a form) and only display that in the WebView (forgetting all other elements like the header, footer etc.).

What is the correct way to go about doing this?

¿Fue útil?

Solución

Run the URLRequest and store it in NSString. Trim unwanted content of this string and then in your UIWebView just call

[webView loadHTMLString:htmlString baseURL:nil];

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top