Skip to content

Commit

Permalink
Removed networking operations from Nimbus. AFNetworking is now the de…
Browse files Browse the repository at this point in the history
…fault networking stack.
  • Loading branch information
jverkoey committed Jun 22, 2012
1 parent d13a77a commit 53ce240
Show file tree
Hide file tree
Showing 11 changed files with 214 additions and 423 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ - (void)viewDidLoad {

self.view.backgroundColor = [UIColor underPageBackgroundColor];

// We only want one network request to be able to fire off at a time.
// We only want one network request to be able to fire off at a time because we know all of the
// requests are going to be for the same image. This way each subsequent request will load the
// already downloaded image from the cache.
[[Nimbus networkOperationQueue] setMaxConcurrentOperationCount:1];

// We're going to create a network image view for each UIViewContentMode that the network image
Expand Down
83 changes: 77 additions & 6 deletions examples/catalog/NimbusCatalog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
6633C7F2158F08EA0054D240 /* AttributedLabelMashup.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6633C7F1158F08EA0054D240 /* AttributedLabelMashup.xib */; };
668B766F15938C8400EA86F6 /* ExtraActionsWebViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B766E15938C8400EA86F6 /* ExtraActionsWebViewController.m */; };
668B7673159394A200EA86F6 /* BasicInstantiationNetworkImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B7672159394A200EA86F6 /* BasicInstantiationNetworkImageViewController.m */; };
668B767B159394EF00EA86F6 /* NINetworkImageRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B7678159394EF00EA86F6 /* NINetworkImageRequest.m */; };
668B767B159394EF00EA86F6 /* NIImageProcessing.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B7678159394EF00EA86F6 /* NIImageProcessing.m */; };
668B767C159394EF00EA86F6 /* NINetworkImageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 668B767A159394EF00EA86F6 /* NINetworkImageView.m */; };
6693C0F0158A63E600950D42 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6693C0EF158A63E600950D42 /* UIKit.framework */; };
6693C0F2158A63E600950D42 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6693C0F1158A63E600950D42 /* Foundation.framework */; };
Expand Down Expand Up @@ -75,6 +75,16 @@
66B9415D1593866900AEA1D2 /* NIWebController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66B9415C1593866900AEA1D2 /* NIWebController.m */; };
66B9415F159386D300AEA1D2 /* NimbusWebController.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 66B9415E159386D300AEA1D2 /* NimbusWebController.bundle */; };
66D2FDB81593D5D000B2BEFD /* ContentModesNetworkImageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDB71593D5D000B2BEFD /* ContentModesNetworkImageViewController.m */; };
66D2FDD11593F17800B2BEFD /* AFHTTPClient.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDBD1593F17800B2BEFD /* AFHTTPClient.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDD21593F17800B2BEFD /* AFHTTPRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDBF1593F17800B2BEFD /* AFHTTPRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDD31593F17800B2BEFD /* AFImageRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDC11593F17800B2BEFD /* AFImageRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDD41593F17800B2BEFD /* AFJSONRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDC31593F17800B2BEFD /* AFJSONRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDD51593F17800B2BEFD /* AFJSONUtilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDC51593F17800B2BEFD /* AFJSONUtilities.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDD61593F17800B2BEFD /* AFNetworkActivityIndicatorManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDC71593F17800B2BEFD /* AFNetworkActivityIndicatorManager.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDD71593F17800B2BEFD /* AFPropertyListRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDCA1593F17800B2BEFD /* AFPropertyListRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDD81593F17800B2BEFD /* AFURLConnectionOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDCC1593F17800B2BEFD /* AFURLConnectionOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDD91593F17800B2BEFD /* AFXMLRequestOperation.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDCE1593F17800B2BEFD /* AFXMLRequestOperation.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
66D2FDDA1593F17800B2BEFD /* UIImageView+AFNetworking.m in Sources */ = {isa = PBXBuildFile; fileRef = 66D2FDD01593F17800B2BEFD /* UIImageView+AFNetworking.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
Expand All @@ -97,8 +107,8 @@
668B7672159394A200EA86F6 /* BasicInstantiationNetworkImageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BasicInstantiationNetworkImageViewController.m; sourceTree = "<group>"; };
668B7675159394EF00EA86F6 /* NimbusNetworkImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NimbusNetworkImage.h; path = ../../src/networkimage/src/NimbusNetworkImage.h; sourceTree = "<group>"; };
668B7676159394EF00EA86F6 /* NimbusNetworkImage+Namespace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NimbusNetworkImage+Namespace.h"; path = "../../src/networkimage/src/NimbusNetworkImage+Namespace.h"; sourceTree = "<group>"; };
668B7677159394EF00EA86F6 /* NINetworkImageRequest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NINetworkImageRequest.h; path = ../../src/networkimage/src/NINetworkImageRequest.h; sourceTree = "<group>"; };
668B7678159394EF00EA86F6 /* NINetworkImageRequest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NINetworkImageRequest.m; path = ../../src/networkimage/src/NINetworkImageRequest.m; sourceTree = "<group>"; };
668B7677159394EF00EA86F6 /* NIImageProcessing.h */ = {isa = PBXFileReference; fileEncoding = 4; name = NIImageProcessing.h; path = ../../src/networkimage/src/NIImageProcessing.h; sourceTree = "<group>"; };
668B7678159394EF00EA86F6 /* NIImageProcessing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NIImageProcessing.m; path = ../../src/networkimage/src/NIImageProcessing.m; sourceTree = "<group>"; };
668B7679159394EF00EA86F6 /* NINetworkImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NINetworkImageView.h; path = ../../src/networkimage/src/NINetworkImageView.h; sourceTree = "<group>"; };
668B767A159394EF00EA86F6 /* NINetworkImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NINetworkImageView.m; path = ../../src/networkimage/src/NINetworkImageView.m; sourceTree = "<group>"; };
6693C0EB158A63E600950D42 /* Nimbus.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Nimbus.app; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -216,6 +226,27 @@
66B9415E159386D300AEA1D2 /* NimbusWebController.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = NimbusWebController.bundle; path = ../../src/webcontroller/resources/NimbusWebController.bundle; sourceTree = "<group>"; };
66D2FDB61593D5D000B2BEFD /* ContentModesNetworkImageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentModesNetworkImageViewController.h; sourceTree = "<group>"; };
66D2FDB71593D5D000B2BEFD /* ContentModesNetworkImageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ContentModesNetworkImageViewController.m; sourceTree = "<group>"; };
66D2FDBC1593F17800B2BEFD /* AFHTTPClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPClient.h; sourceTree = "<group>"; };
66D2FDBD1593F17800B2BEFD /* AFHTTPClient.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPClient.m; sourceTree = "<group>"; };
66D2FDBE1593F17800B2BEFD /* AFHTTPRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFHTTPRequestOperation.h; sourceTree = "<group>"; };
66D2FDBF1593F17800B2BEFD /* AFHTTPRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFHTTPRequestOperation.m; sourceTree = "<group>"; };
66D2FDC01593F17800B2BEFD /* AFImageRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFImageRequestOperation.h; sourceTree = "<group>"; };
66D2FDC11593F17800B2BEFD /* AFImageRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFImageRequestOperation.m; sourceTree = "<group>"; };
66D2FDC21593F17800B2BEFD /* AFJSONRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONRequestOperation.h; sourceTree = "<group>"; };
66D2FDC31593F17800B2BEFD /* AFJSONRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONRequestOperation.m; sourceTree = "<group>"; };
66D2FDC41593F17800B2BEFD /* AFJSONUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFJSONUtilities.h; sourceTree = "<group>"; };
66D2FDC51593F17800B2BEFD /* AFJSONUtilities.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFJSONUtilities.m; sourceTree = "<group>"; };
66D2FDC61593F17800B2BEFD /* AFNetworkActivityIndicatorManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworkActivityIndicatorManager.h; sourceTree = "<group>"; };
66D2FDC71593F17800B2BEFD /* AFNetworkActivityIndicatorManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFNetworkActivityIndicatorManager.m; sourceTree = "<group>"; };
66D2FDC81593F17800B2BEFD /* AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFNetworking.h; sourceTree = "<group>"; };
66D2FDC91593F17800B2BEFD /* AFPropertyListRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFPropertyListRequestOperation.h; sourceTree = "<group>"; };
66D2FDCA1593F17800B2BEFD /* AFPropertyListRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFPropertyListRequestOperation.m; sourceTree = "<group>"; };
66D2FDCB1593F17800B2BEFD /* AFURLConnectionOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFURLConnectionOperation.h; sourceTree = "<group>"; };
66D2FDCC1593F17800B2BEFD /* AFURLConnectionOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFURLConnectionOperation.m; sourceTree = "<group>"; };
66D2FDCD1593F17800B2BEFD /* AFXMLRequestOperation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AFXMLRequestOperation.h; sourceTree = "<group>"; };
66D2FDCE1593F17800B2BEFD /* AFXMLRequestOperation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AFXMLRequestOperation.m; sourceTree = "<group>"; };
66D2FDCF1593F17800B2BEFD /* UIImageView+AFNetworking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIImageView+AFNetworking.h"; sourceTree = "<group>"; };
66D2FDD01593F17800B2BEFD /* UIImageView+AFNetworking.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIImageView+AFNetworking.m"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
Expand Down Expand Up @@ -283,8 +314,8 @@
children = (
668B7675159394EF00EA86F6 /* NimbusNetworkImage.h */,
668B7676159394EF00EA86F6 /* NimbusNetworkImage+Namespace.h */,
668B7677159394EF00EA86F6 /* NINetworkImageRequest.h */,
668B7678159394EF00EA86F6 /* NINetworkImageRequest.m */,
668B7677159394EF00EA86F6 /* NIImageProcessing.h */,
668B7678159394EF00EA86F6 /* NIImageProcessing.m */,
668B7679159394EF00EA86F6 /* NINetworkImageView.h */,
668B767A159394EF00EA86F6 /* NINetworkImageView.m */,
);
Expand All @@ -300,6 +331,7 @@
6693C0FB158A63E600950D42 /* main.m */,
6693C1D0158A808100950D42 /* Catalog */,
6693C14E158A64BD00950D42 /* Nimbus */,
66D2FDBB1593F17800B2BEFD /* AFNetworking */,
6693C10C158A63F700950D42 /* Resources */,
6693C0EE158A63E600950D42 /* Frameworks */,
6693C0EC158A63E600950D42 /* Products */,
Expand Down Expand Up @@ -524,6 +556,35 @@
name = "Web Controller";
sourceTree = "<group>";
};
66D2FDBB1593F17800B2BEFD /* AFNetworking */ = {
isa = PBXGroup;
children = (
66D2FDBC1593F17800B2BEFD /* AFHTTPClient.h */,
66D2FDBD1593F17800B2BEFD /* AFHTTPClient.m */,
66D2FDBE1593F17800B2BEFD /* AFHTTPRequestOperation.h */,
66D2FDBF1593F17800B2BEFD /* AFHTTPRequestOperation.m */,
66D2FDC01593F17800B2BEFD /* AFImageRequestOperation.h */,
66D2FDC11593F17800B2BEFD /* AFImageRequestOperation.m */,
66D2FDC21593F17800B2BEFD /* AFJSONRequestOperation.h */,
66D2FDC31593F17800B2BEFD /* AFJSONRequestOperation.m */,
66D2FDC41593F17800B2BEFD /* AFJSONUtilities.h */,
66D2FDC51593F17800B2BEFD /* AFJSONUtilities.m */,
66D2FDC61593F17800B2BEFD /* AFNetworkActivityIndicatorManager.h */,
66D2FDC71593F17800B2BEFD /* AFNetworkActivityIndicatorManager.m */,
66D2FDC81593F17800B2BEFD /* AFNetworking.h */,
66D2FDC91593F17800B2BEFD /* AFPropertyListRequestOperation.h */,
66D2FDCA1593F17800B2BEFD /* AFPropertyListRequestOperation.m */,
66D2FDCB1593F17800B2BEFD /* AFURLConnectionOperation.h */,
66D2FDCC1593F17800B2BEFD /* AFURLConnectionOperation.m */,
66D2FDCD1593F17800B2BEFD /* AFXMLRequestOperation.h */,
66D2FDCE1593F17800B2BEFD /* AFXMLRequestOperation.m */,
66D2FDCF1593F17800B2BEFD /* UIImageView+AFNetworking.h */,
66D2FDD01593F17800B2BEFD /* UIImageView+AFNetworking.m */,
);
name = AFNetworking;
path = ../../thirdparty/AFNetworking/AFNetworking;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand Down Expand Up @@ -645,9 +706,19 @@
66B9415D1593866900AEA1D2 /* NIWebController.m in Sources */,
668B766F15938C8400EA86F6 /* ExtraActionsWebViewController.m in Sources */,
668B7673159394A200EA86F6 /* BasicInstantiationNetworkImageViewController.m in Sources */,
668B767B159394EF00EA86F6 /* NINetworkImageRequest.m in Sources */,
668B767B159394EF00EA86F6 /* NIImageProcessing.m in Sources */,
668B767C159394EF00EA86F6 /* NINetworkImageView.m in Sources */,
66D2FDB81593D5D000B2BEFD /* ContentModesNetworkImageViewController.m in Sources */,
66D2FDD11593F17800B2BEFD /* AFHTTPClient.m in Sources */,
66D2FDD21593F17800B2BEFD /* AFHTTPRequestOperation.m in Sources */,
66D2FDD31593F17800B2BEFD /* AFImageRequestOperation.m in Sources */,
66D2FDD41593F17800B2BEFD /* AFJSONRequestOperation.m in Sources */,
66D2FDD51593F17800B2BEFD /* AFJSONUtilities.m in Sources */,
66D2FDD61593F17800B2BEFD /* AFNetworkActivityIndicatorManager.m in Sources */,
66D2FDD71593F17800B2BEFD /* AFPropertyListRequestOperation.m in Sources */,
66D2FDD81593F17800B2BEFD /* AFURLConnectionOperation.m in Sources */,
66D2FDD91593F17800B2BEFD /* AFXMLRequestOperation.m in Sources */,
66D2FDDA1593F17800B2BEFD /* UIImageView+AFNetworking.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Loading

0 comments on commit 53ce240

Please sign in to comment.