1

I'm just started to learn about the iOS SDK.

I want to type a URL on a TextField and load a page like in a hidden browser. And when the page finish the loading I need the HTML, to fill a TableView with the results.

I don't need to download the whole page, just the html text.

Basically I'm writtig a "front-end" to a public web service, I'm goggling for a while and can't find a answer.

Vitim.us
  • 20,746
  • 15
  • 92
  • 109
  • Possible duplicate of http://stackoverflow.com/questions/1867002/how-to-download-a-web-page-data-in-objective-c-on-iphone – Emil Jan 14 '12 at 23:29

2 Answers2

1

What you're looking for is NSURLConnection. See the URL Loading System Programming Guide for full details.

Rob Napier
  • 286,113
  • 34
  • 456
  • 610
1

NSString can solve your problem: [NSString stringWithContentsOfURL:[NSURL URLWithString:@"google.com"] encoding:NSUTF8StringEncoding error:nil];

OdNairy
  • 540
  • 4
  • 15
  • why this works to `http://apple.com` but does not work to `http://websro.correios.com.br/sro_bin/txect01$.Inexistente?P_LINGUA=001&P_TIPO=002&P_COD_LIS=EC003071085BR` why? – Vitim.us Jan 17 '12 at 00:08