Authored by DreamPiggy

Update demo to use modern way of image assets, and view layout for rotation

@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 - 32892E311FAE898C00BE8320 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32892E301FAE898C00BE8320 /* Images.xcassets */; }; 10 + 32892E311FAE898C00BE8320 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32892E301FAE898C00BE8320 /* Assets.xcassets */; };
11 32892E351FAE89FE00BE8320 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */; }; 11 32892E351FAE89FE00BE8320 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */; };
12 3E75A9861742DBE700DA412D /* CustomPathImages in Resources */ = {isa = PBXBuildFile; fileRef = 3E75A9851742DBE700DA412D /* CustomPathImages */; }; 12 3E75A9861742DBE700DA412D /* CustomPathImages in Resources */ = {isa = PBXBuildFile; fileRef = 3E75A9851742DBE700DA412D /* CustomPathImages */; };
13 4314D1AA1D0E1181004B36C9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4314D1A91D0E1181004B36C9 /* main.m */; }; 13 4314D1AA1D0E1181004B36C9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4314D1A91D0E1181004B36C9 /* main.m */; };
@@ -42,8 +42,6 @@ @@ -42,8 +42,6 @@
42 537612B0155AB74D005750A4 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 537612AF155AB74D005750A4 /* DetailViewController.m */; }; 42 537612B0155AB74D005750A4 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 537612AF155AB74D005750A4 /* DetailViewController.m */; };
43 537612B3155AB74D005750A4 /* MasterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 537612B1155AB74D005750A4 /* MasterViewController.xib */; }; 43 537612B3155AB74D005750A4 /* MasterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 537612B1155AB74D005750A4 /* MasterViewController.xib */; };
44 537612B6155AB74D005750A4 /* DetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 537612B4155AB74D005750A4 /* DetailViewController.xib */; }; 44 537612B6155AB74D005750A4 /* DetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 537612B4155AB74D005750A4 /* DetailViewController.xib */; };
45 - 53A2B50D155B155A00B12423 /* placeholder.png in Resources */ = {isa = PBXBuildFile; fileRef = 53A2B50B155B155A00B12423 /* placeholder.png */; };  
46 - 53A2B50E155B155A00B12423 /* placeholder@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 53A2B50C155B155A00B12423 /* placeholder@2x.png */; };  
47 DA248D44195470FD00390AB0 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 537612E3155ABA3C005750A4 /* MapKit.framework */; }; 45 DA248D44195470FD00390AB0 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 537612E3155ABA3C005750A4 /* MapKit.framework */; };
48 /* End PBXBuildFile section */ 46 /* End PBXBuildFile section */
49 47
@@ -160,7 +158,7 @@ @@ -160,7 +158,7 @@
160 /* End PBXCopyFilesBuildPhase section */ 158 /* End PBXCopyFilesBuildPhase section */
161 159
162 /* Begin PBXFileReference section */ 160 /* Begin PBXFileReference section */
163 - 32892E301FAE898C00BE8320 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; }; 161 + 32892E301FAE898C00BE8320 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
164 32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; }; 162 32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
165 3E75A9851742DBE700DA412D /* CustomPathImages */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CustomPathImages; sourceTree = SOURCE_ROOT; }; 163 3E75A9851742DBE700DA412D /* CustomPathImages */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CustomPathImages; sourceTree = SOURCE_ROOT; };
166 4314D1A61D0E1181004B36C9 /* SDWebImage TV Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SDWebImage TV Demo.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 164 4314D1A61D0E1181004B36C9 /* SDWebImage TV Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SDWebImage TV Demo.app"; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -212,8 +210,6 @@ @@ -212,8 +210,6 @@
212 537612B5155AB74D005750A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/DetailViewController.xib; sourceTree = "<group>"; }; 210 537612B5155AB74D005750A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/DetailViewController.xib; sourceTree = "<group>"; };
213 537612E3155ABA3C005750A4 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; }; 211 537612E3155ABA3C005750A4 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
214 537612E6155ABA44005750A4 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; }; 212 537612E6155ABA44005750A4 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
215 - 53A2B50B155B155A00B12423 /* placeholder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = placeholder.png; sourceTree = "<group>"; };  
216 - 53A2B50C155B155A00B12423 /* placeholder@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "placeholder@2x.png"; sourceTree = "<group>"; };  
217 DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDWebImage.xcodeproj; path = ../SDWebImage.xcodeproj; sourceTree = "<group>"; }; 213 DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDWebImage.xcodeproj; path = ../SDWebImage.xcodeproj; sourceTree = "<group>"; };
218 /* End PBXFileReference section */ 214 /* End PBXFileReference section */
219 215
@@ -389,7 +385,7 @@ @@ -389,7 +385,7 @@
389 537612B1155AB74D005750A4 /* MasterViewController.xib */, 385 537612B1155AB74D005750A4 /* MasterViewController.xib */,
390 537612B4155AB74D005750A4 /* DetailViewController.xib */, 386 537612B4155AB74D005750A4 /* DetailViewController.xib */,
391 32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */, 387 32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */,
392 - 32892E301FAE898C00BE8320 /* Images.xcassets */, 388 + 32892E301FAE898C00BE8320 /* Assets.xcassets */,
393 537612A0155AB74D005750A4 /* Supporting Files */, 389 537612A0155AB74D005750A4 /* Supporting Files */,
394 ); 390 );
395 path = "SDWebImage Demo"; 391 path = "SDWebImage Demo";
@@ -401,8 +397,6 @@ @@ -401,8 +397,6 @@
401 537612A1155AB74D005750A4 /* SDWebImage Demo-Info.plist */, 397 537612A1155AB74D005750A4 /* SDWebImage Demo-Info.plist */,
402 537612A5155AB74D005750A4 /* main.m */, 398 537612A5155AB74D005750A4 /* main.m */,
403 537612A7155AB74D005750A4 /* SDWebImage Demo-Prefix.pch */, 399 537612A7155AB74D005750A4 /* SDWebImage Demo-Prefix.pch */,
404 - 53A2B50B155B155A00B12423 /* placeholder.png */,  
405 - 53A2B50C155B155A00B12423 /* placeholder@2x.png */,  
406 ); 400 );
407 name = "Supporting Files"; 401 name = "Supporting Files";
408 sourceTree = "<group>"; 402 sourceTree = "<group>";
@@ -652,10 +646,8 @@ @@ -652,10 +646,8 @@
652 files = ( 646 files = (
653 537612B3155AB74D005750A4 /* MasterViewController.xib in Resources */, 647 537612B3155AB74D005750A4 /* MasterViewController.xib in Resources */,
654 537612B6155AB74D005750A4 /* DetailViewController.xib in Resources */, 648 537612B6155AB74D005750A4 /* DetailViewController.xib in Resources */,
655 - 53A2B50D155B155A00B12423 /* placeholder.png in Resources */,  
656 - 32892E311FAE898C00BE8320 /* Images.xcassets in Resources */, 649 + 32892E311FAE898C00BE8320 /* Assets.xcassets in Resources */,
657 32892E351FAE89FE00BE8320 /* LaunchScreen.storyboard in Resources */, 650 32892E351FAE89FE00BE8320 /* LaunchScreen.storyboard in Resources */,
658 - 53A2B50E155B155A00B12423 /* placeholder@2x.png in Resources */,  
659 3E75A9861742DBE700DA412D /* CustomPathImages in Resources */, 651 3E75A9861742DBE700DA412D /* CustomPathImages in Resources */,
660 ); 652 );
661 runOnlyForDeploymentPostprocessing = 0; 653 runOnlyForDeploymentPostprocessing = 0;
  1 +{
  2 + "info" : {
  3 + "version" : 1,
  4 + "author" : "xcode"
  5 + }
  6 +}
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "filename" : "placeholder.png",
  6 + "scale" : "1x"
  7 + },
  8 + {
  9 + "idiom" : "universal",
  10 + "filename" : "placeholder@2x.png",
  11 + "scale" : "2x"
  12 + },
  13 + {
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "version" : 1,
  20 + "author" : "xcode"
  21 + }
  22 +}
@@ -36,8 +36,6 @@ @@ -36,8 +36,6 @@
36 { 36 {
37 if (!_progressView) { 37 if (!_progressView) {
38 _progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault]; 38 _progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault];
39 - _progressView.frame = CGRectMake(0, CGRectGetMaxY(self.navigationController.navigationBar.frame), CGRectGetWidth(self.view.frame), 2.0);  
40 - _progressView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin;  
41 [self.view addSubview:_progressView]; 39 [self.view addSubview:_progressView];
42 } 40 }
43 return _progressView; 41 return _progressView;
@@ -75,6 +73,12 @@ @@ -75,6 +73,12 @@
75 [self configureView]; 73 [self configureView];
76 } 74 }
77 75
  76 +- (void)viewDidLayoutSubviews
  77 +{
  78 + [super viewDidLayoutSubviews];
  79 + self.progressView.frame = CGRectMake(0, self.topLayoutGuide.length, CGRectGetWidth(self.view.bounds), 2.0);
  80 +}
  81 +
78 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 82 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
79 { 83 {
80 return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); 84 return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);