Explorar o código

Add NSULRSessionDataTask to example requests

Ryan Olson %!s(int64=11) %!d(string=hai) anos
pai
achega
51493322c3
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      Example/UICatalog/AAPLAppDelegate.m

+ 3 - 0
Example/UICatalog/AAPLAppDelegate.m

@@ -88,6 +88,9 @@
     NSURLSessionDataTask *dataTask = [mySession dataTaskWithURL:[NSURL URLWithString:@"https://flipboard.com/"]];
     NSURLSessionDataTask *dataTask = [mySession dataTaskWithURL:[NSURL URLWithString:@"https://flipboard.com/"]];
     [dataTask resume];
     [dataTask resume];
 
 
+    NSURLSessionDownloadTask *downloadTask = [mySession downloadTaskWithURL:[NSURL URLWithString:@"https://assets-cdn.github.com/images/icons/emoji/unicode/1f44d.png?v5"]];
+    [downloadTask resume];
+
     NSArray *requestURLStrings = @[ @"http://cdn.flipboard.com/serviceIcons/v2/social-icon-flipboard-96.png",
     NSArray *requestURLStrings = @[ @"http://cdn.flipboard.com/serviceIcons/v2/social-icon-flipboard-96.png",
                                     @"http://lorempixel.com/400/400/",
                                     @"http://lorempixel.com/400/400/",
                                     @"http://google.com",
                                     @"http://google.com",