Merge pull request #2096 from dreampiggy/demo_iOS_progress

Update our iOS demo to modern way, add a UIProgressView to show image download progress
This commit is contained in:
Bogdan Poplauschi 2017-11-05 12:27:52 +02:00 committed by GitHub
commit 6972e600ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 369 additions and 108 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

View File

@ -7,19 +7,27 @@
objects = {
/* Begin PBXBuildFile section */
327E2DCD1FAF0D6A00EF52C2 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43A0FAAF1BDD16AC00B7582B /* SDWebImage.framework */; };
327E2DCE1FAF0D6A00EF52C2 /* SDWebImage.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43A0FAAF1BDD16AC00B7582B /* SDWebImage.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
327E2DD21FAF0D7000EF52C2 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43A629E71D0DFD000089D7DD /* SDWebImage.framework */; };
327E2DD31FAF0D7000EF52C2 /* SDWebImage.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 43A629E71D0DFD000089D7DD /* SDWebImage.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
327E2DD71FAF0D7900EF52C2 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4397D2751D0DDBE100BB2784 /* SDWebImage.framework */; };
327E2DD81FAF0D7900EF52C2 /* SDWebImage.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4397D2751D0DDBE100BB2784 /* SDWebImage.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
327E2DDC1FAF0D8000EF52C2 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 431739601CDFCC370008FEB9 /* SDWebImage.framework */; };
327E2DDD1FAF0D8000EF52C2 /* SDWebImage.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 431739601CDFCC370008FEB9 /* SDWebImage.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
32892E311FAE898C00BE8320 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32892E301FAE898C00BE8320 /* Assets.xcassets */; };
32892E351FAE89FE00BE8320 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */; };
3E75A9861742DBE700DA412D /* CustomPathImages in Resources */ = {isa = PBXBuildFile; fileRef = 3E75A9851742DBE700DA412D /* CustomPathImages */; };
4314D1AA1D0E1181004B36C9 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4314D1A91D0E1181004B36C9 /* main.m */; };
4314D1AD1D0E1181004B36C9 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4314D1AC1D0E1181004B36C9 /* AppDelegate.m */; };
4314D1B01D0E1182004B36C9 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4314D1AF1D0E1182004B36C9 /* ViewController.m */; };
4314D1B31D0E1182004B36C9 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4314D1B11D0E1182004B36C9 /* Main.storyboard */; };
4314D1B51D0E1182004B36C9 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4314D1B41D0E1182004B36C9 /* Assets.xcassets */; };
4314D1BC1D0E11A8004B36C9 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 431739601CDFCC370008FEB9 /* SDWebImage.framework */; };
43A629D31D0DFD000089D7DD /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 43A629D21D0DFD000089D7DD /* AppDelegate.m */; };
43A629D61D0DFD000089D7DD /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 43A629D51D0DFD000089D7DD /* main.m */; };
43A629D91D0DFD000089D7DD /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 43A629D81D0DFD000089D7DD /* ViewController.m */; };
43A629DB1D0DFD000089D7DD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 43A629DA1D0DFD000089D7DD /* Assets.xcassets */; };
43A629DE1D0DFD000089D7DD /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 43A629DC1D0DFD000089D7DD /* Main.storyboard */; };
43A629EB1D0DFDD40089D7DD /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43A629E71D0DFD000089D7DD /* SDWebImage.framework */; };
43A629F21D0E07600089D7DD /* Interface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 43A629F01D0E07600089D7DD /* Interface.storyboard */; };
43A629F41D0E07600089D7DD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 43A629F31D0E07600089D7DD /* Assets.xcassets */; };
43A629FB1D0E07600089D7DD /* SDWebImage Watch Demo Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = 43A629FA1D0E07600089D7DD /* SDWebImage Watch Demo Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
@ -28,8 +36,6 @@
43A62A091D0E07600089D7DD /* NotificationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 43A62A081D0E07600089D7DD /* NotificationController.m */; };
43A62A0B1D0E07600089D7DD /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 43A62A0A1D0E07600089D7DD /* Assets.xcassets */; };
43A62A0F1D0E07600089D7DD /* SDWebImage Watch Demo.app in Embed Watch Content */ = {isa = PBXBuildFile; fileRef = 43A629EE1D0E07600089D7DD /* SDWebImage Watch Demo.app */; };
43F04B3F1D9E468D003F9640 /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4397D2751D0DDBE100BB2784 /* SDWebImage.framework */; };
43F100181D9EE18300F6E0CE /* SDWebImage.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 43A0FAAF1BDD16AC00B7582B /* SDWebImage.framework */; };
531041C1157EAC8F00BBABC3 /* ImageIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 537612E6155ABA44005750A4 /* ImageIO.framework */; };
5376129A155AB74D005750A4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 53761299155AB74D005750A4 /* UIKit.framework */; };
5376129C155AB74D005750A4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5376129B155AB74D005750A4 /* Foundation.framework */; };
@ -40,13 +46,52 @@
537612B0155AB74D005750A4 /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 537612AF155AB74D005750A4 /* DetailViewController.m */; };
537612B3155AB74D005750A4 /* MasterViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 537612B1155AB74D005750A4 /* MasterViewController.xib */; };
537612B6155AB74D005750A4 /* DetailViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 537612B4155AB74D005750A4 /* DetailViewController.xib */; };
53A2B50D155B155A00B12423 /* placeholder.png in Resources */ = {isa = PBXBuildFile; fileRef = 53A2B50B155B155A00B12423 /* placeholder.png */; };
53A2B50E155B155A00B12423 /* placeholder@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 53A2B50C155B155A00B12423 /* placeholder@2x.png */; };
53EEC18916484553007601E1 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 53EEC18816484553007601E1 /* Default-568h@2x.png */; };
DA248D44195470FD00390AB0 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 537612E3155ABA3C005750A4 /* MapKit.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
327E2DAE1FAF0A6B00EF52C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 431BB6891D06D2C1006A3455;
remoteInfo = "SDWebImage watchOS";
};
327E2DB31FAF0B3800EF52C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 4A2CADFE1AB4BB5300B6BC39;
remoteInfo = "SDWebImage iOS";
};
327E2DCF1FAF0D6A00EF52C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 4A2CADFE1AB4BB5300B6BC39;
remoteInfo = "SDWebImage iOS";
};
327E2DD41FAF0D7000EF52C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 4397D2761D0DDD8C00BB2784;
remoteInfo = "SDWebImage OSX";
};
327E2DD91FAF0D7900EF52C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 431BB6891D06D2C1006A3455;
remoteInfo = "SDWebImage watchOS";
};
327E2DDE1FAF0D8000EF52C2 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 00733A4B1BC487C000A5A117;
remoteInfo = "SDWebImage tvOS";
};
4314D19D1D0E0EB6004B36C9 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
@ -110,20 +155,6 @@
remoteGlobalIDString = 43A629ED1D0E07600089D7DD;
remoteInfo = "SDWebImage Watch Demo";
};
43F04B3D1D9E467E003F9640 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 431BB6891D06D2C1006A3455;
remoteInfo = "SDWebImage watchOS";
};
43F100161D9EE17C00F6E0CE /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 4A2CADFE1AB4BB5300B6BC39;
remoteInfo = "SDWebImage iOS";
};
DA248D731954841D00390AB0 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */;
@ -134,6 +165,50 @@
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
327E2DD11FAF0D6A00EF52C2 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
327E2DCE1FAF0D6A00EF52C2 /* SDWebImage.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
327E2DD61FAF0D7000EF52C2 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
327E2DD31FAF0D7000EF52C2 /* SDWebImage.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
327E2DDB1FAF0D7A00EF52C2 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
327E2DD81FAF0D7900EF52C2 /* SDWebImage.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
327E2DE01FAF0D8000EF52C2 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
327E2DDD1FAF0D8000EF52C2 /* SDWebImage.framework in Embed Frameworks */,
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
43A62A131D0E07600089D7DD /* Embed App Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
@ -159,6 +234,8 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
32892E301FAE898C00BE8320 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = "<group>"; };
3E75A9851742DBE700DA412D /* CustomPathImages */ = {isa = PBXFileReference; lastKnownFileType = folder; path = CustomPathImages; sourceTree = SOURCE_ROOT; };
4314D1A61D0E1181004B36C9 /* SDWebImage TV Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "SDWebImage TV Demo.app"; sourceTree = BUILT_PRODUCTS_DIR; };
4314D1A91D0E1181004B36C9 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
@ -209,9 +286,6 @@
537612B5155AB74D005750A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/DetailViewController.xib; sourceTree = "<group>"; };
537612E3155ABA3C005750A4 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = System/Library/Frameworks/MapKit.framework; sourceTree = SDKROOT; };
537612E6155ABA44005750A4 /* ImageIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ImageIO.framework; path = System/Library/Frameworks/ImageIO.framework; sourceTree = SDKROOT; };
53A2B50B155B155A00B12423 /* placeholder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = placeholder.png; sourceTree = "<group>"; };
53A2B50C155B155A00B12423 /* placeholder@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "placeholder@2x.png"; sourceTree = "<group>"; };
53EEC18816484553007601E1 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "../Default-568h@2x.png"; sourceTree = "<group>"; };
DA248D6C1954841D00390AB0 /* SDWebImage.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDWebImage.xcodeproj; path = ../SDWebImage.xcodeproj; sourceTree = "<group>"; };
/* End PBXFileReference section */
@ -220,7 +294,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
4314D1BC1D0E11A8004B36C9 /* SDWebImage.framework in Frameworks */,
327E2DDC1FAF0D8000EF52C2 /* SDWebImage.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -228,7 +302,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
43A629EB1D0DFDD40089D7DD /* SDWebImage.framework in Frameworks */,
327E2DD21FAF0D7000EF52C2 /* SDWebImage.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -236,7 +310,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
43F04B3F1D9E468D003F9640 /* SDWebImage.framework in Frameworks */,
327E2DD71FAF0D7900EF52C2 /* SDWebImage.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -244,11 +318,11 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
43F100181D9EE18300F6E0CE /* SDWebImage.framework in Frameworks */,
DA248D44195470FD00390AB0 /* MapKit.framework in Frameworks */,
531041C1157EAC8F00BBABC3 /* ImageIO.framework in Frameworks */,
5376129A155AB74D005750A4 /* UIKit.framework in Frameworks */,
5376129C155AB74D005750A4 /* Foundation.framework in Frameworks */,
327E2DCD1FAF0D6A00EF52C2 /* SDWebImage.framework in Frameworks */,
5376129E155AB74D005750A4 /* CoreGraphics.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -386,6 +460,8 @@
537612AF155AB74D005750A4 /* DetailViewController.m */,
537612B1155AB74D005750A4 /* MasterViewController.xib */,
537612B4155AB74D005750A4 /* DetailViewController.xib */,
32892E341FAE89FD00BE8320 /* LaunchScreen.storyboard */,
32892E301FAE898C00BE8320 /* Assets.xcassets */,
537612A0155AB74D005750A4 /* Supporting Files */,
);
path = "SDWebImage Demo";
@ -394,12 +470,9 @@
537612A0155AB74D005750A4 /* Supporting Files */ = {
isa = PBXGroup;
children = (
53EEC18816484553007601E1 /* Default-568h@2x.png */,
537612A1155AB74D005750A4 /* SDWebImage Demo-Info.plist */,
537612A5155AB74D005750A4 /* main.m */,
537612A7155AB74D005750A4 /* SDWebImage Demo-Prefix.pch */,
53A2B50B155B155A00B12423 /* placeholder.png */,
53A2B50C155B155A00B12423 /* placeholder@2x.png */,
);
name = "Supporting Files";
sourceTree = "<group>";
@ -427,11 +500,13 @@
4314D1A21D0E1181004B36C9 /* Sources */,
4314D1A31D0E1181004B36C9 /* Frameworks */,
4314D1A41D0E1181004B36C9 /* Resources */,
327E2DE01FAF0D8000EF52C2 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
4314D1BB1D0E11A0004B36C9 /* PBXTargetDependency */,
327E2DDF1FAF0D8000EF52C2 /* PBXTargetDependency */,
);
name = "SDWebImage TV Demo";
productName = "SDWebImage TV Demo";
@ -445,11 +520,13 @@
43A629CB1D0DFD000089D7DD /* Sources */,
43A629CC1D0DFD000089D7DD /* Frameworks */,
43A629CD1D0DFD000089D7DD /* Resources */,
327E2DD61FAF0D7000EF52C2 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
43A629EA1D0DFDCA0089D7DD /* PBXTargetDependency */,
327E2DD51FAF0D7000EF52C2 /* PBXTargetDependency */,
);
name = "SDWebImage OSX Demo";
productName = "SDWebImage OSX Demo";
@ -480,11 +557,13 @@
43A629F61D0E07600089D7DD /* Sources */,
43A629F71D0E07600089D7DD /* Frameworks */,
43A629F81D0E07600089D7DD /* Resources */,
327E2DDB1FAF0D7A00EF52C2 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
43F04B3E1D9E467E003F9640 /* PBXTargetDependency */,
327E2DAF1FAF0A6B00EF52C2 /* PBXTargetDependency */,
327E2DDA1FAF0D7900EF52C2 /* PBXTargetDependency */,
);
name = "SDWebImage Watch Demo Extension";
productName = "SDWebImage Watch Demo Extension";
@ -499,12 +578,14 @@
53761292155AB74D005750A4 /* Frameworks */,
53761293155AB74D005750A4 /* Resources */,
43A62A171D0E07600089D7DD /* Embed Watch Content */,
327E2DD11FAF0D6A00EF52C2 /* Embed Frameworks */,
);
buildRules = (
);
dependencies = (
43F100171D9EE17C00F6E0CE /* PBXTargetDependency */,
43A62A0E1D0E07600089D7DD /* PBXTargetDependency */,
327E2DB41FAF0B3800EF52C2 /* PBXTargetDependency */,
327E2DD01FAF0D6A00EF52C2 /* PBXTargetDependency */,
);
name = "SDWebImage iOS Demo";
productName = "SDWebImage Demo";
@ -649,9 +730,8 @@
files = (
537612B3155AB74D005750A4 /* MasterViewController.xib in Resources */,
537612B6155AB74D005750A4 /* DetailViewController.xib in Resources */,
53A2B50D155B155A00B12423 /* placeholder.png in Resources */,
53A2B50E155B155A00B12423 /* placeholder@2x.png in Resources */,
53EEC18916484553007601E1 /* Default-568h@2x.png in Resources */,
32892E311FAE898C00BE8320 /* Assets.xcassets in Resources */,
32892E351FAE89FE00BE8320 /* LaunchScreen.storyboard in Resources */,
3E75A9861742DBE700DA412D /* CustomPathImages in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -703,6 +783,36 @@
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
327E2DAF1FAF0A6B00EF52C2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage watchOS";
targetProxy = 327E2DAE1FAF0A6B00EF52C2 /* PBXContainerItemProxy */;
};
327E2DB41FAF0B3800EF52C2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage iOS";
targetProxy = 327E2DB31FAF0B3800EF52C2 /* PBXContainerItemProxy */;
};
327E2DD01FAF0D6A00EF52C2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage iOS";
targetProxy = 327E2DCF1FAF0D6A00EF52C2 /* PBXContainerItemProxy */;
};
327E2DD51FAF0D7000EF52C2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage OSX";
targetProxy = 327E2DD41FAF0D7000EF52C2 /* PBXContainerItemProxy */;
};
327E2DDA1FAF0D7900EF52C2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage watchOS";
targetProxy = 327E2DD91FAF0D7900EF52C2 /* PBXContainerItemProxy */;
};
327E2DDF1FAF0D8000EF52C2 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage tvOS";
targetProxy = 327E2DDE1FAF0D8000EF52C2 /* PBXContainerItemProxy */;
};
4314D1BB1D0E11A0004B36C9 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage tvOS";
@ -723,16 +833,6 @@
target = 43A629ED1D0E07600089D7DD /* SDWebImage Watch Demo */;
targetProxy = 43A62A0D1D0E07600089D7DD /* PBXContainerItemProxy */;
};
43F04B3E1D9E467E003F9640 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage watchOS";
targetProxy = 43F04B3D1D9E467E003F9640 /* PBXContainerItemProxy */;
};
43F100171D9EE17C00F6E0CE /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = "SDWebImage iOS";
targetProxy = 43F100161D9EE17C00F6E0CE /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
@ -938,6 +1038,7 @@
43A62A111D0E07600089D7DD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -975,6 +1076,7 @@
43A62A121D0E07600089D7DD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
APPLICATION_EXTENSION_API_ONLY = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@ -1173,6 +1275,7 @@
537612BA155AB74D005750A4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
@ -1186,6 +1289,7 @@
);
INFOPLIST_FILE = "SDWebImage Demo/SDWebImage Demo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_CFLAGS = "";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.${PRODUCT_NAME:rfc1034identifier}";
@ -1198,6 +1302,7 @@
537612BB155AB74D005750A4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)\"",
@ -1211,6 +1316,7 @@
);
INFOPLIST_FILE = "SDWebImage Demo/SDWebImage Demo-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_BUNDLE_IDENTIFIER = "com.dailymotion.${PRODUCT_NAME:rfc1034identifier}";
PRODUCT_NAME = "$(TARGET_NAME)";

View File

@ -0,0 +1,98 @@
{
"images" : [
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "20x20",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"scale" : "3x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "20x20",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "29x29",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "40x40",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "1x"
},
{
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"scale" : "1x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "placeholder.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "placeholder@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}

View File

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -7,55 +7,64 @@
*/
#import "DetailViewController.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import <SDWebImage/FLAnimatedImageView.h>
#import <SDWebImage/FLAnimatedImageView+WebCache.h>
@interface DetailViewController ()
@property (strong, nonatomic) IBOutlet FLAnimatedImageView *imageView;
- (void)configureView;
@property (strong, nonatomic) UIActivityIndicatorView *activityIndicator;
@property (strong, nonatomic) UIProgressView *progressView;
@end
@implementation DetailViewController
@synthesize imageURL = _imageURL;
@synthesize imageView = _imageView;
#pragma mark - Managing the detail item
- (void)setImageURL:(NSURL *)imageURL
- (UIActivityIndicatorView *)activityIndicator
{
if (_imageURL != imageURL)
{
_imageURL = imageURL;
[self configureView];
if (!_activityIndicator) {
_activityIndicator = [UIActivityIndicatorView.alloc initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
_activityIndicator.center = self.imageView.center;
_activityIndicator.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin;
[self.imageView addSubview:_activityIndicator];
}
return _activityIndicator;
}
- (UIProgressView *)progressView
{
if (!_progressView) {
_progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleDefault];
[self.view addSubview:_progressView];
}
return _progressView;
}
- (void)configureView
{
if (self.imageURL) {
__block UIActivityIndicatorView *activityIndicator;
__weak UIImageView *weakImageView = self.imageView;
[self.imageView sd_setImageWithURL:self.imageURL
placeholderImage:nil
options:SDWebImageProgressiveDownload
progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL *targetURL) {
dispatch_async(dispatch_get_main_queue(), ^{
if (!activityIndicator) {
[weakImageView addSubview:activityIndicator = [UIActivityIndicatorView.alloc initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]];
activityIndicator.center = weakImageView.center;
[activityIndicator startAnimating];
}
});
}
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
[activityIndicator removeFromSuperview];
activityIndicator = nil;
}];
}
self.activityIndicator.hidden = NO;
[self.activityIndicator startAnimating];
__weak typeof(self) weakSelf = self;
[self.imageView sd_setImageWithURL:self.imageURL
placeholderImage:nil
options:SDWebImageProgressiveDownload
progress:^(NSInteger receivedSize, NSInteger expectedSize, NSURL *targetURL) {
dispatch_async(dispatch_get_main_queue(), ^{
float progress = 0;
if (expectedSize != 0) {
progress = (float)receivedSize / (float)expectedSize;
}
weakSelf.progressView.hidden = NO;
[weakSelf.progressView setProgress:progress animated:YES];
});
}
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
weakSelf.progressView.hidden = YES;
[weakSelf.activityIndicator stopAnimating];
weakSelf.activityIndicator.hidden = YES;
}];
}
- (void)viewDidLoad
@ -64,10 +73,10 @@
[self configureView];
}
- (void)viewDidUnload
- (void)viewDidLayoutSubviews
{
[super viewDidUnload];
self.imageView = nil;
[super viewDidLayoutSubviews];
self.progressView.frame = CGRectMake(0, self.topLayoutGuide.length, CGRectGetWidth(self.view.bounds), 2.0);
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

View File

@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="16C67" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
</document>

View File

@ -8,10 +8,6 @@
#import <UIKit/UIKit.h>
@class DetailViewController;
@interface MasterViewController : UITableViewController
@property (strong, nonatomic) DetailViewController *detailViewController;
@end

View File

@ -7,13 +7,10 @@
*/
#import "MasterViewController.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "DetailViewController.h"
#import <SDWebImage/FLAnimatedImageView.h>
#import <SDWebImage/FLAnimatedImageView+WebCache.h>
#import <SDWebImage/UIView+WebCache.h>
@interface MyCustomTableViewCell : UITableViewCell
@property (nonatomic, strong) UILabel *customTextLabel;
@ -21,7 +18,6 @@
@end
@implementation MyCustomTableViewCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
@ -39,17 +35,14 @@
@end
@interface MasterViewController ()
@property (nonatomic, strong) NSMutableArray<NSString *> *objects;
@interface MasterViewController () {
NSMutableArray *_objects;
}
@end
@implementation MasterViewController
@synthesize detailViewController = _detailViewController;
- (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
@ -66,7 +59,7 @@
[SDWebImageManager sharedManager].imageDownloader.username = @"httpwatch";
[SDWebImageManager sharedManager].imageDownloader.password = @"httpwatch01";
_objects = [NSMutableArray arrayWithObjects:
self.objects = [NSMutableArray arrayWithObjects:
@"http://www.httpwatch.com/httpgallery/authentication/authenticatedimage/default.aspx?0.35786508303135633", // requires HTTP auth, used to demo the NTLM auth
@"http://assets.sbnation.com/assets/2512203/dogflops.gif",
@"https://raw.githubusercontent.com/liyong03/YLGIFImage/master/YLGIFImageDemo/YLGIFImageDemo/joy.gif",
@ -80,7 +73,7 @@
nil];
for (int i=0; i<100; i++) {
[_objects addObject:[NSString stringWithFormat:@"https://s3.amazonaws.com/fast-image-cache/demo-images/FICDDemoImage%03d.jpg", i]];
[self.objects addObject:[NSString stringWithFormat:@"https://s3.amazonaws.com/fast-image-cache/demo-images/FICDDemoImage%03d.jpg", i]];
}
}
@ -109,7 +102,7 @@
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return _objects.count;
return self.objects.count;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
@ -130,7 +123,7 @@
[cell.customImageView sd_setIndicatorStyle:UIActivityIndicatorViewStyleGray];
cell.customTextLabel.text = [NSString stringWithFormat:@"Image #%ld", (long)indexPath.row];
[cell.customImageView sd_setImageWithURL:[NSURL URLWithString:_objects[indexPath.row]]
[cell.customImageView sd_setImageWithURL:[NSURL URLWithString:self.objects[indexPath.row]]
placeholderImage:placeholderImage
options:indexPath.row == 0 ? SDWebImageRefreshCached : 0];
return cell;
@ -138,13 +131,11 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
if (!self.detailViewController)
{
self.detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
}
NSString *largeImageURL = [_objects[indexPath.row] stringByReplacingOccurrencesOfString:@"small" withString:@"source"];
self.detailViewController.imageURL = [NSURL URLWithString:largeImageURL];
[self.navigationController pushViewController:self.detailViewController animated:YES];
NSString *largeImageURLString = [self.objects[indexPath.row] stringByReplacingOccurrencesOfString:@"small" withString:@"source"];
NSURL *largeImageURL = [NSURL URLWithString:largeImageURLString];
DetailViewController *detailViewController = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil];
detailViewController.imageURL = largeImageURL;
[self.navigationController pushViewController:detailViewController animated:YES];
}
@end

View File

@ -8,6 +8,10 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
@ -29,6 +33,8 @@
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0900"
LastUpgradeVersion = "0910"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
@ -66,7 +66,7 @@
<EnvironmentVariables>
<EnvironmentVariable
key = "OS_ACTIVITY_MODE"
value = "disable"
value = "default"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>