0

So my question is quite simple but I have no idea where to begin. I'm trying to make an app in xCode for OSX that will load up specific parts from webpages. The problem is whenever I use the built-in web navigator the entire page loads up.

I looked up for several relative questions on Stackoverflow and found this post but I can't really understand the answer given as it only explains how I can use stringByEvaluatingJavaScriptFromString to "have (or create) some javascript to navigate / manipulate / interrogate the page contents" according to Wain.

Also I want the user to be able to interact with the element loaded, meaning it will refresh over time or whenever active.

Important note: I'm using third-party websites.
Also I'm not asking for code, more like some tutorial/documentation on how to achieve what I'm looking for. Furthermore, I have no example code to offer, as this is a pre-development phase.

Thanks for all the help in advance.

Community
  • 1
  • 1
Lae
  • 832
  • 1
  • 13
  • 34

1 Answers1

0

Yes, the UIWebView won't allow you to do this. You can use NSURLConnection to load the web page into an NSData object, then convert that to an NSString object. You can then extract just the parts you want from the string, and do what you like with them. You could build a new HTML page in memory to display in a UIWebView, or you could build an attributed string to display in a UITextView.

Community
  • 1
  • 1
Brett Donald
  • 6,745
  • 4
  • 23
  • 51