RIP
Tutorial
Tags
Topics
Examples
eBooks
Tutorial by Examples
Delegate methods
//conform the NSURLConnectionDelegate protocol. @interface ViewController : UIViewController<NSURLConnectionDelegate> { NSMutableData *_responseData; } //Implementation of the NSURLConnection protocol methods. #pragma mark NSURLConnection Delegate Methods - (void)connection:(NS...
Synchronous Request
NSURLRequest * urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]; NSURLResponse * response = nil; NSError * error = nil; NSData * data = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&a...
Asynchronous request
// Create the request instance. NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]; // Create url connection and fire request NSURLConnection *conn = [[NSURLConnection alloc] initWithRequest:request delegate:self];
Page 1 of 1
1
Cookie
This website stores cookies on your computer.
We use cookies to enhance your experience on our website and deliver personalized content.
For more details on our cookie usage, please review our
Cookie Policy
and
Privacy Policy
Accept all Cookies
Leave this website