Answer the question
In order to leave comments, you need to log in
How to get and parse html c url in Objective C?
There is a url: airqualityegg.com/egg/1655739499
It is necessary to display three indicators in the application. What to write? This is my first time working with Objective C.
Answer the question
In order to leave comments, you need to log in
This is how you can get the html code of the page:
NSString *myURLString = @"http://google.com";
NSURL *myURL = [NSURL URLWithString:myURLString];
NSError *error = nil;
NSString *myHTMLString = [NSString stringWithContentsOfURL:myURL encoding: NSUTF8StringEncoding error:&error];
if (error != nil)
{
NSLog(@"Error : %@", error);
}
else
{
NSLog(@"HTML : %@", myHTMLString);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question