-1

Hi could anyone point me in the direction that I need to be looking for the downloading of text from a website.

For example;

If I wanted to obtain the text from this website: http://en.wikipedia.org/wiki/Lorum_ipsum

How would I;

1) How would I go about connecting to the website and reading the content? 2) How would I display this content in a scrollView?

Thanks.

nhunston
  • 1,347
  • 5
  • 13
  • 22
  • I took a look at, NSURLConnection but I'm not sure if this would work? – nhunston May 27 '11 at 23:12
  • this is a very general question, it would suggest you haven't done much in the way of learning about cocoa touch and iPhone development – Matt May 27 '11 at 23:16
  • @Herly: try some things. If you get errors, try to fix them. If you're stumped, post code and ask for help on a specific part. SO is not here to write your app for you. – PengOne May 27 '11 at 23:19
  • @PengOne I know you aren't here to write my app, I was hoping people could either point me in the right direction or give me a starting point I don't want people to write it for me because I won't learn anything that way. – nhunston May 27 '11 at 23:20
  • @Herly: Your question is still too vague. **Try something**. Load a web page in a webview. Get that working. Try to read the title of the page. Try specific things, then ask if you cannot get it working. This question is too general. – PengOne May 27 '11 at 23:22
  • you need to learn cocoa touch programming, a great book for that is head first iphone development. it should equip you with a good understanding of app construction and then you can fill the blanks in by looking at google, id also recommend browsing questions on SO, a great way to learn about the usual issues developers hit – Matt May 27 '11 at 23:31
  • @Matt Yeah I did a book on Iphone programming about 4 or so months ago but then swapped to Android, all the stuff that I learnt is slowly coming back, walk before you can run huh. – nhunston May 27 '11 at 23:32

2 Answers2

2

Here are two places to look to get you started:

  1. http://cocoawithlove.com/2008/09/cocoa-application-driven-by-http-data.html

  2. Is it possible to read the contents of a web page into a string so i can parse out the data?

It took 3 seconds and 5 words in a google search to find them.

Community
  • 1
  • 1
PengOne
  • 48,188
  • 17
  • 130
  • 149
0

To display you could use either UILabel with UIScrollView or UITextView (which has automatic scrolling).

fatih
  • 1,171
  • 2
  • 14
  • 26
  • I took a look at all three of those, and I think that the UITextView is the best for me because of the auto-scroll. – nhunston May 27 '11 at 23:30