Tutorial by Examples

//conform the NSURLConnectionDelegate protocol. @interface ViewController : UIViewController<NSURLConnectionDelegate> { NSMutableData *_responseData; } //Implementation of the NSURLConnection protocol methods. #pragma mark NSURLConnection Delegate Methods - (void)connection:(NS...
NSURLRequest * urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]; NSURLResponse * response = nil; NSError * error = nil; NSData * data = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&a...
// 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