└── xiachufang ├── Podfile ├── Podfile.lock ├── Pods ├── AFNetworking │ ├── AFNetworking │ │ ├── AFHTTPRequestOperation.h │ │ ├── AFHTTPRequestOperation.m │ │ ├── AFHTTPRequestOperationManager.h │ │ ├── AFHTTPRequestOperationManager.m │ │ ├── AFHTTPSessionManager.h │ │ ├── AFHTTPSessionManager.m │ │ ├── AFNetworkReachabilityManager.h │ │ ├── AFNetworkReachabilityManager.m │ │ ├── AFNetworking.h │ │ ├── AFSecurityPolicy.h │ │ ├── AFSecurityPolicy.m │ │ ├── AFURLConnectionOperation.h │ │ ├── AFURLConnectionOperation.m │ │ ├── AFURLRequestSerialization.h │ │ ├── AFURLRequestSerialization.m │ │ ├── AFURLResponseSerialization.h │ │ ├── AFURLResponseSerialization.m │ │ ├── AFURLSessionManager.h │ │ └── AFURLSessionManager.m │ ├── LICENSE │ ├── README.md │ └── UIKit+AFNetworking │ │ ├── AFNetworkActivityIndicatorManager.h │ │ ├── AFNetworkActivityIndicatorManager.m │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ ├── UIActivityIndicatorView+AFNetworking.m │ │ ├── UIAlertView+AFNetworking.h │ │ ├── UIAlertView+AFNetworking.m │ │ ├── UIButton+AFNetworking.h │ │ ├── UIButton+AFNetworking.m │ │ ├── UIImageView+AFNetworking.h │ │ ├── UIImageView+AFNetworking.m │ │ ├── UIKit+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.m │ │ ├── UIRefreshControl+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.m │ │ ├── UIWebView+AFNetworking.h │ │ └── UIWebView+AFNetworking.m ├── Headers │ ├── Private │ │ ├── AFNetworking │ │ │ ├── AFHTTPRequestOperation.h │ │ │ ├── AFHTTPRequestOperationManager.h │ │ │ ├── AFHTTPSessionManager.h │ │ │ ├── AFNetworkActivityIndicatorManager.h │ │ │ ├── AFNetworkReachabilityManager.h │ │ │ ├── AFNetworking.h │ │ │ ├── AFSecurityPolicy.h │ │ │ ├── AFURLConnectionOperation.h │ │ │ ├── AFURLRequestSerialization.h │ │ │ ├── AFURLResponseSerialization.h │ │ │ ├── AFURLSessionManager.h │ │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ │ ├── UIAlertView+AFNetworking.h │ │ │ ├── UIButton+AFNetworking.h │ │ │ ├── UIImageView+AFNetworking.h │ │ │ ├── UIKit+AFNetworking.h │ │ │ ├── UIProgressView+AFNetworking.h │ │ │ ├── UIRefreshControl+AFNetworking.h │ │ │ └── UIWebView+AFNetworking.h │ │ ├── Mantle │ │ │ ├── EXTKeyPathCoding.h │ │ │ ├── EXTRuntimeExtensions.h │ │ │ ├── EXTScope.h │ │ │ ├── MTLJSONAdapter.h │ │ │ ├── MTLModel+NSCoding.h │ │ │ ├── MTLModel.h │ │ │ ├── MTLReflection.h │ │ │ ├── MTLTransformerErrorHandling.h │ │ │ ├── MTLValueTransformer.h │ │ │ ├── Mantle.h │ │ │ ├── NSArray+MTLManipulationAdditions.h │ │ │ ├── NSDictionary+MTLJSONKeyPath.h │ │ │ ├── NSDictionary+MTLManipulationAdditions.h │ │ │ ├── NSDictionary+MTLMappingAdditions.h │ │ │ ├── NSError+MTLModelException.h │ │ │ ├── NSObject+MTLComparisonAdditions.h │ │ │ ├── NSValueTransformer+MTLInversionAdditions.h │ │ │ ├── NSValueTransformer+MTLPredefinedTransformerAdditions.h │ │ │ └── metamacros.h │ │ └── SDWebImage │ │ │ ├── NSData+ImageContentType.h │ │ │ ├── SDImageCache.h │ │ │ ├── SDWebImageCompat.h │ │ │ ├── SDWebImageDecoder.h │ │ │ ├── SDWebImageDownloader.h │ │ │ ├── SDWebImageDownloaderOperation.h │ │ │ ├── SDWebImageManager.h │ │ │ ├── SDWebImageOperation.h │ │ │ ├── SDWebImagePrefetcher.h │ │ │ ├── UIButton+WebCache.h │ │ │ ├── UIImage+GIF.h │ │ │ ├── UIImage+MultiFormat.h │ │ │ ├── UIImageView+HighlightedWebCache.h │ │ │ ├── UIImageView+WebCache.h │ │ │ └── UIView+WebCacheOperation.h │ └── Public │ │ ├── AFNetworking │ │ ├── AFHTTPRequestOperation.h │ │ ├── AFHTTPRequestOperationManager.h │ │ ├── AFHTTPSessionManager.h │ │ ├── AFNetworkActivityIndicatorManager.h │ │ ├── AFNetworkReachabilityManager.h │ │ ├── AFNetworking.h │ │ ├── AFSecurityPolicy.h │ │ ├── AFURLConnectionOperation.h │ │ ├── AFURLRequestSerialization.h │ │ ├── AFURLResponseSerialization.h │ │ ├── AFURLSessionManager.h │ │ ├── UIActivityIndicatorView+AFNetworking.h │ │ ├── UIAlertView+AFNetworking.h │ │ ├── UIButton+AFNetworking.h │ │ ├── UIImageView+AFNetworking.h │ │ ├── UIKit+AFNetworking.h │ │ ├── UIProgressView+AFNetworking.h │ │ ├── UIRefreshControl+AFNetworking.h │ │ └── UIWebView+AFNetworking.h │ │ ├── Mantle │ │ ├── MTLJSONAdapter.h │ │ ├── MTLModel+NSCoding.h │ │ ├── MTLModel.h │ │ ├── MTLReflection.h │ │ ├── MTLTransformerErrorHandling.h │ │ ├── MTLValueTransformer.h │ │ ├── Mantle.h │ │ ├── NSArray+MTLManipulationAdditions.h │ │ ├── NSDictionary+MTLJSONKeyPath.h │ │ ├── NSDictionary+MTLManipulationAdditions.h │ │ ├── NSDictionary+MTLMappingAdditions.h │ │ ├── NSError+MTLModelException.h │ │ ├── NSObject+MTLComparisonAdditions.h │ │ ├── NSValueTransformer+MTLInversionAdditions.h │ │ └── NSValueTransformer+MTLPredefinedTransformerAdditions.h │ │ └── SDWebImage │ │ ├── NSData+ImageContentType.h │ │ ├── SDImageCache.h │ │ ├── SDWebImageCompat.h │ │ ├── SDWebImageDecoder.h │ │ ├── SDWebImageDownloader.h │ │ ├── SDWebImageDownloaderOperation.h │ │ ├── SDWebImageManager.h │ │ ├── SDWebImageOperation.h │ │ ├── SDWebImagePrefetcher.h │ │ ├── UIButton+WebCache.h │ │ ├── UIImage+GIF.h │ │ ├── UIImage+MultiFormat.h │ │ ├── UIImageView+HighlightedWebCache.h │ │ ├── UIImageView+WebCache.h │ │ └── UIView+WebCacheOperation.h ├── Manifest.lock ├── Mantle │ ├── LICENSE.md │ ├── Mantle │ │ ├── MTLJSONAdapter.h │ │ ├── MTLJSONAdapter.m │ │ ├── MTLModel+NSCoding.h │ │ ├── MTLModel+NSCoding.m │ │ ├── MTLModel.h │ │ ├── MTLModel.m │ │ ├── MTLReflection.h │ │ ├── MTLReflection.m │ │ ├── MTLTransformerErrorHandling.h │ │ ├── MTLTransformerErrorHandling.m │ │ ├── MTLValueTransformer.h │ │ ├── MTLValueTransformer.m │ │ ├── Mantle.h │ │ ├── NSArray+MTLManipulationAdditions.h │ │ ├── NSArray+MTLManipulationAdditions.m │ │ ├── NSDictionary+MTLJSONKeyPath.h │ │ ├── NSDictionary+MTLJSONKeyPath.m │ │ ├── NSDictionary+MTLManipulationAdditions.h │ │ ├── NSDictionary+MTLManipulationAdditions.m │ │ ├── NSDictionary+MTLMappingAdditions.h │ │ ├── NSDictionary+MTLMappingAdditions.m │ │ ├── NSError+MTLModelException.h │ │ ├── NSError+MTLModelException.m │ │ ├── NSObject+MTLComparisonAdditions.h │ │ ├── NSObject+MTLComparisonAdditions.m │ │ ├── NSValueTransformer+MTLInversionAdditions.h │ │ ├── NSValueTransformer+MTLInversionAdditions.m │ │ ├── NSValueTransformer+MTLPredefinedTransformerAdditions.h │ │ ├── NSValueTransformer+MTLPredefinedTransformerAdditions.m │ │ └── extobjc │ │ │ ├── EXTKeyPathCoding.h │ │ │ ├── EXTRuntimeExtensions.h │ │ │ ├── EXTRuntimeExtensions.m │ │ │ ├── EXTScope.h │ │ │ ├── EXTScope.m │ │ │ └── metamacros.h │ └── README.md ├── Pods.xcodeproj │ ├── project.pbxproj │ └── xcuserdata │ │ ├── denglanfeng.xcuserdatad │ │ └── xcschemes │ │ │ ├── AFNetworking.xcscheme │ │ │ ├── Mantle.xcscheme │ │ │ ├── Pods.xcscheme │ │ │ ├── SDWebImage.xcscheme │ │ │ └── xcschememanagement.plist │ │ └── zangqilong.xcuserdatad │ │ └── xcschemes │ │ ├── AFNetworking.xcscheme │ │ ├── Mantle.xcscheme │ │ ├── Pods.xcscheme │ │ ├── SDWebImage.xcscheme │ │ └── xcschememanagement.plist ├── SDWebImage │ ├── LICENSE │ ├── README.md │ └── SDWebImage │ │ ├── NSData+ImageContentType.h │ │ ├── NSData+ImageContentType.m │ │ ├── SDImageCache.h │ │ ├── SDImageCache.m │ │ ├── SDWebImageCompat.h │ │ ├── SDWebImageCompat.m │ │ ├── SDWebImageDecoder.h │ │ ├── SDWebImageDecoder.m │ │ ├── SDWebImageDownloader.h │ │ ├── SDWebImageDownloader.m │ │ ├── SDWebImageDownloaderOperation.h │ │ ├── SDWebImageDownloaderOperation.m │ │ ├── SDWebImageManager.h │ │ ├── SDWebImageManager.m │ │ ├── SDWebImageOperation.h │ │ ├── SDWebImagePrefetcher.h │ │ ├── SDWebImagePrefetcher.m │ │ ├── UIButton+WebCache.h │ │ ├── UIButton+WebCache.m │ │ ├── UIImage+GIF.h │ │ ├── UIImage+GIF.m │ │ ├── UIImage+MultiFormat.h │ │ ├── UIImage+MultiFormat.m │ │ ├── UIImageView+HighlightedWebCache.h │ │ ├── UIImageView+HighlightedWebCache.m │ │ ├── UIImageView+WebCache.h │ │ ├── UIImageView+WebCache.m │ │ ├── UIView+WebCacheOperation.h │ │ └── UIView+WebCacheOperation.m └── Target Support Files │ ├── AFNetworking │ ├── AFNetworking-Private.xcconfig │ ├── AFNetworking-dummy.m │ ├── AFNetworking-prefix.pch │ └── AFNetworking.xcconfig │ ├── Mantle │ ├── Mantle-Private.xcconfig │ ├── Mantle-dummy.m │ ├── Mantle-prefix.pch │ └── Mantle.xcconfig │ ├── Pods │ ├── Pods-acknowledgements.markdown │ ├── Pods-acknowledgements.plist │ ├── Pods-dummy.m │ ├── Pods-resources.sh │ ├── Pods.debug.xcconfig │ └── Pods.release.xcconfig │ └── SDWebImage │ ├── SDWebImage-Private.xcconfig │ ├── SDWebImage-dummy.m │ ├── SDWebImage-prefix.pch │ └── SDWebImage.xcconfig ├── xiachufang.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── denglanfeng.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ ├── denglanfeng.xcuserdatad │ └── xcschemes │ │ ├── xcschememanagement.plist │ │ └── xiachufang.xcscheme │ └── zangqilong.xcuserdatad │ └── xcschemes │ ├── xcschememanagement.plist │ └── xiachufang.xcscheme ├── xiachufang.xcworkspace ├── contents.xcworkspacedata └── xcuserdata │ ├── denglanfeng.xcuserdatad │ └── UserInterfaceState.xcuserstate │ └── zangqilong.xcuserdatad │ └── UserInterfaceState.xcuserstate ├── xiachufang ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── FifthTableViewCell.h ├── FifthTableViewCell.m ├── FifthTableViewCell.xib ├── FirstRowTableViewCell.h ├── FirstRowTableViewCell.m ├── FourthTableViewCell.h ├── FourthTableViewCell.m ├── HomePageRecipe.h ├── HomePageRecipe.m ├── HomeTableViewController.h ├── HomeTableViewController.m ├── Info.plist ├── SecondRowTableViewCell.h ├── SecondRowTableViewCell.m ├── ThirdTableViewCell.h ├── ThirdTableViewCell.m ├── UIColor+themeColor.h ├── UIColor+themeColor.m └── main.m ├── xiachufangTests ├── Info.plist └── xiachufangTests.m └── xiachufangUITests ├── Info.plist └── xiachufangUITests.m /xiachufang/Podfile: -------------------------------------------------------------------------------- 1 | platform :ios, '8.0' 2 | 3 | pod 'SDWebImage', '~>3.7' 4 | pod "AFNetworking", "~> 2.0" 5 | pod 'Mantle', '~> 2.0.4' 6 | -------------------------------------------------------------------------------- /xiachufang/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (2.5.4): 3 | - AFNetworking/NSURLConnection (= 2.5.4) 4 | - AFNetworking/NSURLSession (= 2.5.4) 5 | - AFNetworking/Reachability (= 2.5.4) 6 | - AFNetworking/Security (= 2.5.4) 7 | - AFNetworking/Serialization (= 2.5.4) 8 | - AFNetworking/UIKit (= 2.5.4) 9 | - AFNetworking/NSURLConnection (2.5.4): 10 | - AFNetworking/Reachability 11 | - AFNetworking/Security 12 | - AFNetworking/Serialization 13 | - AFNetworking/NSURLSession (2.5.4): 14 | - AFNetworking/Reachability 15 | - AFNetworking/Security 16 | - AFNetworking/Serialization 17 | - AFNetworking/Reachability (2.5.4) 18 | - AFNetworking/Security (2.5.4) 19 | - AFNetworking/Serialization (2.5.4) 20 | - AFNetworking/UIKit (2.5.4): 21 | - AFNetworking/NSURLConnection 22 | - AFNetworking/NSURLSession 23 | - Mantle (2.0.4): 24 | - Mantle/extobjc (= 2.0.4) 25 | - Mantle/extobjc (2.0.4) 26 | - SDWebImage (3.7.3): 27 | - SDWebImage/Core (= 3.7.3) 28 | - SDWebImage/Core (3.7.3) 29 | 30 | DEPENDENCIES: 31 | - AFNetworking (~> 2.0) 32 | - Mantle (~> 2.0.4) 33 | - SDWebImage (~> 3.7) 34 | 35 | SPEC CHECKSUMS: 36 | AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e 37 | Mantle: 6bee68168423948be0c0c5924832bf3af188e099 38 | SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84 39 | 40 | COCOAPODS: 0.38.2 41 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h: -------------------------------------------------------------------------------- 1 | // AFHTTPRequestOperation.h 2 | // Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | #import "AFURLConnectionOperation.h" 24 | 25 | /** 26 | `AFHTTPRequestOperation` is a subclass of `AFURLConnectionOperation` for requests using the HTTP or HTTPS protocols. It encapsulates the concept of acceptable status codes and content types, which determine the success or failure of a request. 27 | */ 28 | @interface AFHTTPRequestOperation : AFURLConnectionOperation 29 | 30 | ///------------------------------------------------ 31 | /// @name Getting HTTP URL Connection Information 32 | ///------------------------------------------------ 33 | 34 | /** 35 | The last HTTP response received by the operation's connection. 36 | */ 37 | @property (readonly, nonatomic, strong) NSHTTPURLResponse *response; 38 | 39 | /** 40 | Responses sent from the server in data tasks created with `dataTaskWithRequest:success:failure:` and run using the `GET` / `POST` / et al. convenience methods are automatically validated and serialized by the response serializer. By default, this property is set to an AFHTTPResponse serializer, which uses the raw data as its response object. The serializer validates the status code to be in the `2XX` range, denoting success. If the response serializer generates an error in `-responseObjectForResponse:data:error:`, the `failure` callback of the session task or request operation will be executed; otherwise, the `success` callback will be executed. 41 | 42 | @warning `responseSerializer` must not be `nil`. Setting a response serializer will clear out any cached value 43 | */ 44 | @property (nonatomic, strong) AFHTTPResponseSerializer * responseSerializer; 45 | 46 | /** 47 | An object constructed by the `responseSerializer` from the response and response data. Returns `nil` unless the operation `isFinished`, has a `response`, and has `responseData` with non-zero content length. If an error occurs during serialization, `nil` will be returned, and the `error` property will be populated with the serialization error. 48 | */ 49 | @property (readonly, nonatomic, strong) id responseObject; 50 | 51 | ///----------------------------------------------------------- 52 | /// @name Setting Completion Block Success / Failure Callbacks 53 | ///----------------------------------------------------------- 54 | 55 | /** 56 | Sets the `completionBlock` property with a block that executes either the specified success or failure block, depending on the state of the request on completion. If `error` returns a value, which can be caused by an unacceptable status code or content type, then `failure` is executed. Otherwise, `success` is executed. 57 | 58 | This method should be overridden in subclasses in order to specify the response object passed into the success block. 59 | 60 | @param success The block to be executed on the completion of a successful request. This block has no return value and takes two arguments: the receiver operation and the object constructed from the response data of the request. 61 | @param failure The block to be executed on the completion of an unsuccessful request. This block has no return value and takes two arguments: the receiver operation and the error that occurred during the request. 62 | */ 63 | - (void)setCompletionBlockWithSuccess:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success 64 | failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | // AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | #import 25 | 26 | #ifndef _AFNETWORKING_ 27 | #define _AFNETWORKING_ 28 | 29 | #import "AFURLRequestSerialization.h" 30 | #import "AFURLResponseSerialization.h" 31 | #import "AFSecurityPolicy.h" 32 | #import "AFNetworkReachabilityManager.h" 33 | 34 | #import "AFURLConnectionOperation.h" 35 | #import "AFHTTPRequestOperation.h" 36 | #import "AFHTTPRequestOperationManager.h" 37 | 38 | #if ( ( defined(__MAC_OS_X_VERSION_MAX_ALLOWED) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 1090) || \ 39 | ( defined(__IPHONE_OS_VERSION_MAX_ALLOWED) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 70000 ) ) 40 | #import "AFURLSessionManager.h" 41 | #import "AFHTTPSessionManager.h" 42 | #endif 43 | 44 | #endif /* _AFNETWORKING_ */ 45 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | // AFNetworkActivityIndicatorManager.h 2 | // Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 27 | 28 | #import 29 | 30 | /** 31 | `AFNetworkActivityIndicatorManager` manages the state of the network activity indicator in the status bar. When enabled, it will listen for notifications indicating that a network request operation has started or finished, and start or stop animating the indicator accordingly. The number of active requests is incremented and decremented much like a stack or a semaphore, and the activity indicator will animate so long as that number is greater than zero. 32 | 33 | You should enable the shared instance of `AFNetworkActivityIndicatorManager` when your application finishes launching. In `AppDelegate application:didFinishLaunchingWithOptions:` you can do so with the following code: 34 | 35 | [[AFNetworkActivityIndicatorManager sharedManager] setEnabled:YES]; 36 | 37 | By setting `enabled` to `YES` for `sharedManager`, the network activity indicator will show and hide automatically as requests start and finish. You should not ever need to call `incrementActivityCount` or `decrementActivityCount` yourself. 38 | 39 | See the Apple Human Interface Guidelines section about the Network Activity Indicator for more information: 40 | http://developer.apple.com/library/iOS/#documentation/UserExperience/Conceptual/MobileHIG/UIElementGuidelines/UIElementGuidelines.html#//apple_ref/doc/uid/TP40006556-CH13-SW44 41 | */ 42 | @interface AFNetworkActivityIndicatorManager : NSObject 43 | 44 | /** 45 | A Boolean value indicating whether the manager is enabled. 46 | 47 | If YES, the manager will change status bar network activity indicator according to network operation notifications it receives. The default value is NO. 48 | */ 49 | @property (nonatomic, assign, getter = isEnabled) BOOL enabled; 50 | 51 | /** 52 | A Boolean value indicating whether the network activity indicator is currently displayed in the status bar. 53 | */ 54 | @property (readonly, nonatomic, assign) BOOL isNetworkActivityIndicatorVisible; 55 | 56 | /** 57 | Returns the shared network activity indicator manager object for the system. 58 | 59 | @return The systemwide network activity indicator manager. 60 | */ 61 | + (instancetype)sharedManager; 62 | 63 | /** 64 | Increments the number of active network requests. If this number was zero before incrementing, this will start animating the status bar network activity indicator. 65 | */ 66 | - (void)incrementActivityCount; 67 | 68 | /** 69 | Decrements the number of active network requests. If this number becomes zero after decrementing, this will stop animating the status bar network activity indicator. 70 | */ 71 | - (void)decrementActivityCount; 72 | 73 | @end 74 | 75 | #endif 76 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.h 2 | // Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 27 | 28 | #import 29 | 30 | @class AFURLConnectionOperation; 31 | 32 | /** 33 | This category adds methods to the UIKit framework's `UIActivityIndicatorView` class. The methods in this category provide support for automatically starting and stopping animation depending on the loading state of a request operation or session task. 34 | */ 35 | @interface UIActivityIndicatorView (AFNetworking) 36 | 37 | ///---------------------------------- 38 | /// @name Animating for Session Tasks 39 | ///---------------------------------- 40 | 41 | /** 42 | Binds the animating state to the state of the specified task. 43 | 44 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 45 | */ 46 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 47 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task; 48 | #endif 49 | 50 | ///--------------------------------------- 51 | /// @name Animating for Request Operations 52 | ///--------------------------------------- 53 | 54 | /** 55 | Binds the animating state to the execution state of the specified operation. 56 | 57 | @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. 58 | */ 59 | - (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation; 60 | 61 | @end 62 | 63 | #endif 64 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.m: -------------------------------------------------------------------------------- 1 | // UIActivityIndicatorView+AFNetworking.m 2 | // Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import "UIActivityIndicatorView+AFNetworking.h" 23 | 24 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 25 | 26 | #import "AFHTTPRequestOperation.h" 27 | 28 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 29 | #import "AFURLSessionManager.h" 30 | #endif 31 | 32 | @implementation UIActivityIndicatorView (AFNetworking) 33 | 34 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 35 | - (void)setAnimatingWithStateOfTask:(NSURLSessionTask *)task { 36 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 37 | 38 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 39 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 40 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 41 | 42 | if (task) { 43 | if (task.state != NSURLSessionTaskStateCompleted) { 44 | if (task.state == NSURLSessionTaskStateRunning) { 45 | [self startAnimating]; 46 | } else { 47 | [self stopAnimating]; 48 | } 49 | 50 | [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingTaskDidResumeNotification object:task]; 51 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidCompleteNotification object:task]; 52 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingTaskDidSuspendNotification object:task]; 53 | } 54 | } 55 | } 56 | #endif 57 | 58 | #pragma mark - 59 | 60 | - (void)setAnimatingWithStateOfOperation:(AFURLConnectionOperation *)operation { 61 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 62 | 63 | [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; 64 | [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; 65 | 66 | if (operation) { 67 | if (![operation isFinished]) { 68 | if ([operation isExecuting]) { 69 | [self startAnimating]; 70 | } else { 71 | [self stopAnimating]; 72 | } 73 | 74 | [notificationCenter addObserver:self selector:@selector(af_startAnimating) name:AFNetworkingOperationDidStartNotification object:operation]; 75 | [notificationCenter addObserver:self selector:@selector(af_stopAnimating) name:AFNetworkingOperationDidFinishNotification object:operation]; 76 | } 77 | } 78 | } 79 | 80 | #pragma mark - 81 | 82 | - (void)af_startAnimating { 83 | dispatch_async(dispatch_get_main_queue(), ^{ 84 | [self startAnimating]; 85 | }); 86 | } 87 | 88 | - (void)af_stopAnimating { 89 | dispatch_async(dispatch_get_main_queue(), ^{ 90 | [self stopAnimating]; 91 | }); 92 | } 93 | 94 | @end 95 | 96 | #endif 97 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIKit+AFNetworking.h 2 | // 3 | // Copyright (c) 2013 AFNetworking (http://afnetworking.com/) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #ifndef _UIKIT_AFNETWORKING_ 26 | #define _UIKIT_AFNETWORKING_ 27 | 28 | #import "AFNetworkActivityIndicatorManager.h" 29 | 30 | #import "UIActivityIndicatorView+AFNetworking.h" 31 | #import "UIAlertView+AFNetworking.h" 32 | #import "UIButton+AFNetworking.h" 33 | #import "UIImageView+AFNetworking.h" 34 | #import "UIKit+AFNetworking.h" 35 | #import "UIProgressView+AFNetworking.h" 36 | #import "UIRefreshControl+AFNetworking.h" 37 | #import "UIWebView+AFNetworking.h" 38 | #endif /* _UIKIT_AFNETWORKING_ */ 39 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIProgressView+AFNetworking.h 2 | // Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 3 | // 4 | // Permission is hereby granted, free of charge, to any person obtaining a copy 5 | // of this software and associated documentation files (the "Software"), to deal 6 | // in the Software without restriction, including without limitation the rights 7 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | // copies of the Software, and to permit persons to whom the Software is 9 | // furnished to do so, subject to the following conditions: 10 | // 11 | // The above copyright notice and this permission notice shall be included in 12 | // all copies or substantial portions of the Software. 13 | // 14 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | // THE SOFTWARE. 21 | 22 | #import 23 | 24 | #import 25 | 26 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 27 | 28 | #import 29 | 30 | @class AFURLConnectionOperation; 31 | 32 | /** 33 | This category adds methods to the UIKit framework's `UIProgressView` class. The methods in this category provide support for binding the progress to the upload and download progress of a session task or request operation. 34 | */ 35 | @interface UIProgressView (AFNetworking) 36 | 37 | ///------------------------------------ 38 | /// @name Setting Session Task Progress 39 | ///------------------------------------ 40 | 41 | /** 42 | Binds the progress to the upload progress of the specified session task. 43 | 44 | @param task The session task. 45 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 46 | */ 47 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 48 | - (void)setProgressWithUploadProgressOfTask:(NSURLSessionUploadTask *)task 49 | animated:(BOOL)animated; 50 | #endif 51 | 52 | /** 53 | Binds the progress to the download progress of the specified session task. 54 | 55 | @param task The session task. 56 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 57 | */ 58 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 59 | - (void)setProgressWithDownloadProgressOfTask:(NSURLSessionDownloadTask *)task 60 | animated:(BOOL)animated; 61 | #endif 62 | 63 | ///------------------------------------ 64 | /// @name Setting Session Task Progress 65 | ///------------------------------------ 66 | 67 | /** 68 | Binds the progress to the upload progress of the specified request operation. 69 | 70 | @param operation The request operation. 71 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 72 | */ 73 | - (void)setProgressWithUploadProgressOfOperation:(AFURLConnectionOperation *)operation 74 | animated:(BOOL)animated; 75 | 76 | /** 77 | Binds the progress to the download progress of the specified request operation. 78 | 79 | @param operation The request operation. 80 | @param animated `YES` if the change should be animated, `NO` if the change should happen immediately. 81 | */ 82 | - (void)setProgressWithDownloadProgressOfOperation:(AFURLConnectionOperation *)operation 83 | animated:(BOOL)animated; 84 | 85 | @end 86 | 87 | #endif 88 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import 24 | 25 | #import 26 | 27 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 28 | 29 | #import 30 | 31 | @class AFURLConnectionOperation; 32 | 33 | /** 34 | This category adds methods to the UIKit framework's `UIRefreshControl` class. The methods in this category provide support for automatically begining and ending refreshing depending on the loading state of a request operation or session task. 35 | */ 36 | @interface UIRefreshControl (AFNetworking) 37 | 38 | ///----------------------------------- 39 | /// @name Refreshing for Session Tasks 40 | ///----------------------------------- 41 | 42 | /** 43 | Binds the refreshing state to the state of the specified task. 44 | 45 | @param task The task. If `nil`, automatic updating from any previously specified operation will be disabled. 46 | */ 47 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 48 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task; 49 | #endif 50 | 51 | ///---------------------------------------- 52 | /// @name Refreshing for Request Operations 53 | ///---------------------------------------- 54 | 55 | /** 56 | Binds the refreshing state to the execution state of the specified operation. 57 | 58 | @param operation The operation. If `nil`, automatic updating from any previously specified operation will be disabled. 59 | */ 60 | - (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation; 61 | 62 | @end 63 | 64 | #endif 65 | -------------------------------------------------------------------------------- /xiachufang/Pods/AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.m: -------------------------------------------------------------------------------- 1 | // UIRefreshControl+AFNetworking.m 2 | // 3 | // Copyright (c) 2014 AFNetworking (http://afnetworking.com) 4 | // 5 | // Permission is hereby granted, free of charge, to any person obtaining a copy 6 | // of this software and associated documentation files (the "Software"), to deal 7 | // in the Software without restriction, including without limitation the rights 8 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | // copies of the Software, and to permit persons to whom the Software is 10 | // furnished to do so, subject to the following conditions: 11 | // 12 | // The above copyright notice and this permission notice shall be included in 13 | // all copies or substantial portions of the Software. 14 | // 15 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | // THE SOFTWARE. 22 | 23 | #import "UIRefreshControl+AFNetworking.h" 24 | 25 | #if defined(__IPHONE_OS_VERSION_MIN_REQUIRED) 26 | 27 | #import "AFHTTPRequestOperation.h" 28 | 29 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 30 | #import "AFURLSessionManager.h" 31 | #endif 32 | 33 | @implementation UIRefreshControl (AFNetworking) 34 | 35 | #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 70000 36 | - (void)setRefreshingWithStateOfTask:(NSURLSessionTask *)task { 37 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 38 | 39 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidResumeNotification object:nil]; 40 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidSuspendNotification object:nil]; 41 | [notificationCenter removeObserver:self name:AFNetworkingTaskDidCompleteNotification object:nil]; 42 | 43 | if (task) { 44 | if (task.state == NSURLSessionTaskStateRunning) { 45 | [self beginRefreshing]; 46 | 47 | [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingTaskDidResumeNotification object:task]; 48 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidCompleteNotification object:task]; 49 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingTaskDidSuspendNotification object:task]; 50 | } else { 51 | [self endRefreshing]; 52 | } 53 | } 54 | } 55 | #endif 56 | 57 | - (void)setRefreshingWithStateOfOperation:(AFURLConnectionOperation *)operation { 58 | NSNotificationCenter *notificationCenter = [NSNotificationCenter defaultCenter]; 59 | 60 | [notificationCenter removeObserver:self name:AFNetworkingOperationDidStartNotification object:nil]; 61 | [notificationCenter removeObserver:self name:AFNetworkingOperationDidFinishNotification object:nil]; 62 | 63 | if (operation) { 64 | if (![operation isFinished]) { 65 | if ([operation isExecuting]) { 66 | [self beginRefreshing]; 67 | } else { 68 | [self endRefreshing]; 69 | } 70 | 71 | [notificationCenter addObserver:self selector:@selector(af_beginRefreshing) name:AFNetworkingOperationDidStartNotification object:operation]; 72 | [notificationCenter addObserver:self selector:@selector(af_endRefreshing) name:AFNetworkingOperationDidFinishNotification object:operation]; 73 | } 74 | } 75 | } 76 | 77 | #pragma mark - 78 | 79 | - (void)af_beginRefreshing { 80 | dispatch_async(dispatch_get_main_queue(), ^{ 81 | [self beginRefreshing]; 82 | }); 83 | } 84 | 85 | - (void)af_endRefreshing { 86 | dispatch_async(dispatch_get_main_queue(), ^{ 87 | [self endRefreshing]; 88 | }); 89 | } 90 | 91 | @end 92 | 93 | #endif 94 | -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperation.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFHTTPRequestOperationManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFURLConnectionOperation.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLConnectionOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/UIAlertView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/EXTKeyPathCoding.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/extobjc/EXTKeyPathCoding.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/EXTRuntimeExtensions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/extobjc/EXTRuntimeExtensions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/EXTScope.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/extobjc/EXTScope.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/MTLJSONAdapter.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLJSONAdapter.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/MTLModel+NSCoding.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLModel+NSCoding.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/MTLModel.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLModel.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/MTLReflection.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLReflection.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/MTLTransformerErrorHandling.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLTransformerErrorHandling.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/MTLValueTransformer.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLValueTransformer.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/Mantle.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/Mantle.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/NSArray+MTLManipulationAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSArray+MTLManipulationAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/NSDictionary+MTLJSONKeyPath.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/NSDictionary+MTLManipulationAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/NSDictionary+MTLMappingAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSDictionary+MTLMappingAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/NSError+MTLModelException.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSError+MTLModelException.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/NSObject+MTLComparisonAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSObject+MTLComparisonAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/NSValueTransformer+MTLInversionAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/Mantle/metamacros.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/extobjc/metamacros.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/SDImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDImageCache.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/SDWebImageDecoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDecoder.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/SDWebImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/SDWebImageDownloaderOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/SDWebImageManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/SDWebImagePrefetcher.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/UIButton+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/UIImageView+HighlightedWebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/UIImageView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Private/SDWebImage/UIView+WebCacheOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperation.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPRequestOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFHTTPRequestOperationManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPRequestOperationManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFHTTPSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFHTTPSessionManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFNetworkActivityIndicatorManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/AFNetworkActivityIndicatorManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFNetworkReachabilityManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworkReachabilityManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFSecurityPolicy.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFSecurityPolicy.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFURLConnectionOperation.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLConnectionOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFURLRequestSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLRequestSerialization.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFURLResponseSerialization.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLResponseSerialization.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/AFURLSessionManager.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/AFNetworking/AFURLSessionManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/UIActivityIndicatorView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIActivityIndicatorView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/UIAlertView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIAlertView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/UIButton+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIButton+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/UIImageView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIImageView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/UIKit+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIKit+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/UIProgressView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIProgressView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/UIRefreshControl+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIRefreshControl+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/AFNetworking/UIWebView+AFNetworking.h: -------------------------------------------------------------------------------- 1 | ../../../AFNetworking/UIKit+AFNetworking/UIWebView+AFNetworking.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/MTLJSONAdapter.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLJSONAdapter.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/MTLModel+NSCoding.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLModel+NSCoding.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/MTLModel.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLModel.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/MTLReflection.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLReflection.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/MTLTransformerErrorHandling.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLTransformerErrorHandling.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/MTLValueTransformer.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/MTLValueTransformer.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/Mantle.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/Mantle.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/NSArray+MTLManipulationAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSArray+MTLManipulationAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/NSDictionary+MTLJSONKeyPath.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/NSDictionary+MTLManipulationAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/NSDictionary+MTLMappingAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSDictionary+MTLMappingAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/NSError+MTLModelException.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSError+MTLModelException.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/NSObject+MTLComparisonAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSObject+MTLComparisonAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/NSValueTransformer+MTLInversionAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h: -------------------------------------------------------------------------------- 1 | ../../../Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/NSData+ImageContentType.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/SDImageCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDImageCache.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageCompat.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/SDWebImageDecoder.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDecoder.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/SDWebImageDownloader.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloader.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/SDWebImageDownloaderOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/SDWebImageManager.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageManager.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImageOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/SDWebImagePrefetcher.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/SDWebImagePrefetcher.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/UIButton+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIButton+WebCache.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImage+GIF.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImage+MultiFormat.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/UIImageView+HighlightedWebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/UIImageView+WebCache.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIImageView+WebCache.h -------------------------------------------------------------------------------- /xiachufang/Pods/Headers/Public/SDWebImage/UIView+WebCacheOperation.h: -------------------------------------------------------------------------------- 1 | ../../../SDWebImage/SDWebImage/UIView+WebCacheOperation.h -------------------------------------------------------------------------------- /xiachufang/Pods/Manifest.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - AFNetworking (2.5.4): 3 | - AFNetworking/NSURLConnection (= 2.5.4) 4 | - AFNetworking/NSURLSession (= 2.5.4) 5 | - AFNetworking/Reachability (= 2.5.4) 6 | - AFNetworking/Security (= 2.5.4) 7 | - AFNetworking/Serialization (= 2.5.4) 8 | - AFNetworking/UIKit (= 2.5.4) 9 | - AFNetworking/NSURLConnection (2.5.4): 10 | - AFNetworking/Reachability 11 | - AFNetworking/Security 12 | - AFNetworking/Serialization 13 | - AFNetworking/NSURLSession (2.5.4): 14 | - AFNetworking/Reachability 15 | - AFNetworking/Security 16 | - AFNetworking/Serialization 17 | - AFNetworking/Reachability (2.5.4) 18 | - AFNetworking/Security (2.5.4) 19 | - AFNetworking/Serialization (2.5.4) 20 | - AFNetworking/UIKit (2.5.4): 21 | - AFNetworking/NSURLConnection 22 | - AFNetworking/NSURLSession 23 | - Mantle (2.0.4): 24 | - Mantle/extobjc (= 2.0.4) 25 | - Mantle/extobjc (2.0.4) 26 | - SDWebImage (3.7.3): 27 | - SDWebImage/Core (= 3.7.3) 28 | - SDWebImage/Core (3.7.3) 29 | 30 | DEPENDENCIES: 31 | - AFNetworking (~> 2.0) 32 | - Mantle (~> 2.0.4) 33 | - SDWebImage (~> 3.7) 34 | 35 | SPEC CHECKSUMS: 36 | AFNetworking: 05edc0ac4c4c8cf57bcf4b84be5b0744b6d8e71e 37 | Mantle: 6bee68168423948be0c0c5924832bf3af188e099 38 | SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84 39 | 40 | COCOAPODS: 0.38.2 41 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/LICENSE.md: -------------------------------------------------------------------------------- 1 | **Copyright (c) GitHub, Inc.** 2 | **All rights reserved.** 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | 10 | --- 11 | 12 | **This project uses portions of code from the Proton framework.** 13 | **Proton is copyright (c) 2012, Bitswift, Inc.** 14 | **All rights reserved.** 15 | 16 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 17 | 18 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 19 | * Neither the name of the Bitswift, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 22 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/MTLReflection.h: -------------------------------------------------------------------------------- 1 | // 2 | // MTLReflection.h 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2013-03-12. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /// Creates a selector from a key and a constant string. 12 | /// 13 | /// key - The key to insert into the generated selector. This key should be in 14 | /// its natural case. 15 | /// suffix - A string to append to the key as part of the selector. 16 | /// 17 | /// Returns a selector, or NULL if the input strings cannot form a valid 18 | /// selector. 19 | SEL MTLSelectorWithKeyPattern(NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2))); 20 | 21 | /// Creates a selector from a key and a constant prefix and suffix. 22 | /// 23 | /// prefix - A string to prepend to the key as part of the selector. 24 | /// key - The key to insert into the generated selector. This key should be in 25 | /// its natural case, and will have its first letter capitalized when 26 | /// inserted. 27 | /// suffix - A string to append to the key as part of the selector. 28 | /// 29 | /// Returns a selector, or NULL if the input strings cannot form a valid 30 | /// selector. 31 | SEL MTLSelectorWithCapitalizedKeyPattern(const char *prefix, NSString *key, const char *suffix) __attribute__((pure, nonnull(1, 2, 3))); 32 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/MTLReflection.m: -------------------------------------------------------------------------------- 1 | // 2 | // MTLReflection.m 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2013-03-12. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import "MTLReflection.h" 10 | #import 11 | 12 | SEL MTLSelectorWithKeyPattern(NSString *key, const char *suffix) { 13 | NSUInteger keyLength = [key maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding]; 14 | NSUInteger suffixLength = strlen(suffix); 15 | 16 | char selector[keyLength + suffixLength + 1]; 17 | 18 | BOOL success = [key getBytes:selector maxLength:keyLength usedLength:&keyLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, key.length) remainingRange:NULL]; 19 | if (!success) return NULL; 20 | 21 | memcpy(selector + keyLength, suffix, suffixLength); 22 | selector[keyLength + suffixLength] = '\0'; 23 | 24 | return sel_registerName(selector); 25 | } 26 | 27 | SEL MTLSelectorWithCapitalizedKeyPattern(const char *prefix, NSString *key, const char *suffix) { 28 | NSUInteger prefixLength = strlen(prefix); 29 | NSUInteger suffixLength = strlen(suffix); 30 | 31 | NSString *initial = [key substringToIndex:1].uppercaseString; 32 | NSUInteger initialLength = [initial maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding]; 33 | 34 | NSString *rest = [key substringFromIndex:1]; 35 | NSUInteger restLength = [rest maximumLengthOfBytesUsingEncoding:NSUTF8StringEncoding]; 36 | 37 | char selector[prefixLength + initialLength + restLength + suffixLength + 1]; 38 | memcpy(selector, prefix, prefixLength); 39 | 40 | BOOL success = [initial getBytes:selector + prefixLength maxLength:initialLength usedLength:&initialLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, initial.length) remainingRange:NULL]; 41 | if (!success) return NULL; 42 | 43 | success = [rest getBytes:selector + prefixLength + initialLength maxLength:restLength usedLength:&restLength encoding:NSUTF8StringEncoding options:0 range:NSMakeRange(0, rest.length) remainingRange:NULL]; 44 | if (!success) return NULL; 45 | 46 | memcpy(selector + prefixLength + initialLength + restLength, suffix, suffixLength); 47 | selector[prefixLength + initialLength + restLength + suffixLength] = '\0'; 48 | 49 | return sel_registerName(selector); 50 | } 51 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/MTLTransformerErrorHandling.h: -------------------------------------------------------------------------------- 1 | // 2 | // MTLTransformerErrorHandling.h 3 | // Mantle 4 | // 5 | // Created by Robert Böhnke on 10/6/13. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | /// The domain for errors originating from the MTLTransformerErrorHandling 12 | /// protocol. 13 | /// 14 | /// Transformers conforming to this protocol are expected to use this error 15 | /// domain if the transformation fails. 16 | extern NSString * const MTLTransformerErrorHandlingErrorDomain; 17 | 18 | /// Used to indicate that the input value was illegal. 19 | /// 20 | /// Transformers conforming to this protocol are expected to use this error code 21 | /// if the transformation fails due to an invalid input value. 22 | extern const NSInteger MTLTransformerErrorHandlingErrorInvalidInput; 23 | 24 | /// Associated with the invalid input value. 25 | /// 26 | /// Transformers conforming to this protocol are expected to associate this key 27 | /// with the invalid input in the userInfo dictionary. 28 | extern NSString * const MTLTransformerErrorHandlingInputValueErrorKey; 29 | 30 | /// This protocol can be implemented by NSValueTransformer subclasses to 31 | /// communicate errors that occur during transformation. 32 | @protocol MTLTransformerErrorHandling 33 | @required 34 | 35 | /// Transforms a value, returning any error that occurred during transformation. 36 | /// 37 | /// value - The value to transform. 38 | /// success - If not NULL, this will be set to a boolean indicating whether the 39 | /// transformation was successful. 40 | /// error - If not NULL, this may be set to an error that occurs during 41 | /// transforming the value. 42 | /// 43 | /// Returns the result of the transformation which may be nil. Clients should 44 | /// inspect the success parameter to decide how to proceed with the result. 45 | - (id)transformedValue:(id)value success:(BOOL *)success error:(NSError **)error; 46 | 47 | @optional 48 | 49 | /// Reverse-transforms a value, returning any error that occurred during 50 | /// transformation. 51 | /// 52 | /// Transformers conforming to this protocol are expected to implemented this 53 | /// method if they support reverse transformation. 54 | /// 55 | /// value - The value to transform. 56 | /// success - If not NULL, this will be set to a boolean indicating whether the 57 | /// transformation was successful. 58 | /// error - If not NULL, this may be set to an error that occurs during 59 | /// transforming the value. 60 | /// 61 | /// Returns the result of the reverse transformation which may be nil. Clients 62 | /// should inspect the success parameter to decide how to proceed with the 63 | /// result. 64 | - (id)reverseTransformedValue:(id)value success:(BOOL *)success error:(NSError **)error; 65 | 66 | @end 67 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/MTLTransformerErrorHandling.m: -------------------------------------------------------------------------------- 1 | // 2 | // MTLTransformerErrorHandling.h 3 | // Mantle 4 | // 5 | // Created by Robert Böhnke on 10/6/13. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import "MTLTransformerErrorHandling.h" 10 | 11 | NSString * const MTLTransformerErrorHandlingErrorDomain = @"MTLTransformerErrorHandlingErrorDomain"; 12 | 13 | const NSInteger MTLTransformerErrorHandlingErrorInvalidInput = 1; 14 | 15 | NSString * const MTLTransformerErrorHandlingInputValueErrorKey = @"MTLTransformerErrorHandlingInputValueErrorKey"; 16 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/MTLValueTransformer.h: -------------------------------------------------------------------------------- 1 | // 2 | // MTLValueTransformer.h 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2012-09-11. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "MTLTransformerErrorHandling.h" 12 | 13 | /// A block that represents a transformation. 14 | /// 15 | /// value - The value to transform. 16 | /// success - The block must set this parameter to indicate whether the 17 | /// transformation was successful. 18 | /// MTLValueTransformer will always call this block with *success 19 | /// initialized to YES. 20 | /// error - If not NULL, this may be set to an error that occurs during 21 | /// transforming the value. 22 | /// 23 | /// Returns the result of the transformation, which may be nil. 24 | typedef id (^MTLValueTransformerBlock)(id value, BOOL *success, NSError **error); 25 | 26 | /// 27 | /// A value transformer supporting block-based transformation. 28 | /// 29 | @interface MTLValueTransformer : NSValueTransformer 30 | 31 | /// Returns a transformer which transforms values using the given block. Reverse 32 | /// transformations will not be allowed. 33 | + (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)transformation; 34 | 35 | /// Returns a transformer which transforms values using the given block, for 36 | /// forward or reverse transformations. 37 | + (instancetype)transformerUsingReversibleBlock:(MTLValueTransformerBlock)transformation; 38 | 39 | /// Returns a transformer which transforms values using the given blocks. 40 | + (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)forwardTransformation reverseBlock:(MTLValueTransformerBlock)reverseTransformation; 41 | 42 | @end 43 | 44 | @interface MTLValueTransformer (Deprecated) 45 | 46 | + (NSValueTransformer *)transformerWithBlock:(id (^)(id))transformationBlock __attribute__((deprecated("Replaced by +transformerUsingForwardBlock:"))); 47 | 48 | + (NSValueTransformer *)reversibleTransformerWithBlock:(id (^)(id))transformationBlock __attribute__((deprecated("Replaced by +transformerUsingReversibleBlock:"))); 49 | 50 | + (NSValueTransformer *)reversibleTransformerWithForwardBlock:(id (^)(id))forwardBlock reverseBlock:(id (^)(id))reverseBlock __attribute__((deprecated("Replaced by +transformerUsingForwardBlock:reverseBlock:"))); 51 | 52 | @end 53 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/MTLValueTransformer.m: -------------------------------------------------------------------------------- 1 | // 2 | // MTLValueTransformer.m 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2012-09-11. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "MTLValueTransformer.h" 10 | 11 | // 12 | // Any MTLValueTransformer supporting reverse transformation. Necessary because 13 | // +allowsReverseTransformation is a class method. 14 | // 15 | @interface MTLReversibleValueTransformer : MTLValueTransformer 16 | @end 17 | 18 | @interface MTLValueTransformer () 19 | 20 | @property (nonatomic, copy, readonly) MTLValueTransformerBlock forwardBlock; 21 | @property (nonatomic, copy, readonly) MTLValueTransformerBlock reverseBlock; 22 | 23 | @end 24 | 25 | @implementation MTLValueTransformer 26 | 27 | #pragma mark Lifecycle 28 | 29 | + (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)forwardBlock { 30 | return [[self alloc] initWithForwardBlock:forwardBlock reverseBlock:nil]; 31 | } 32 | 33 | + (instancetype)transformerUsingReversibleBlock:(MTLValueTransformerBlock)reversibleBlock { 34 | return [self transformerUsingForwardBlock:reversibleBlock reverseBlock:reversibleBlock]; 35 | } 36 | 37 | + (instancetype)transformerUsingForwardBlock:(MTLValueTransformerBlock)forwardBlock reverseBlock:(MTLValueTransformerBlock)reverseBlock { 38 | return [[MTLReversibleValueTransformer alloc] initWithForwardBlock:forwardBlock reverseBlock:reverseBlock]; 39 | } 40 | 41 | - (id)initWithForwardBlock:(MTLValueTransformerBlock)forwardBlock reverseBlock:(MTLValueTransformerBlock)reverseBlock { 42 | NSParameterAssert(forwardBlock != nil); 43 | 44 | self = [super init]; 45 | if (self == nil) return nil; 46 | 47 | _forwardBlock = [forwardBlock copy]; 48 | _reverseBlock = [reverseBlock copy]; 49 | 50 | return self; 51 | } 52 | 53 | #pragma mark NSValueTransformer 54 | 55 | + (BOOL)allowsReverseTransformation { 56 | return NO; 57 | } 58 | 59 | + (Class)transformedValueClass { 60 | return NSObject.class; 61 | } 62 | 63 | - (id)transformedValue:(id)value { 64 | NSError *error = nil; 65 | BOOL success = YES; 66 | 67 | return self.forwardBlock(value, &success, &error); 68 | } 69 | 70 | - (id)transformedValue:(id)value success:(BOOL *)outerSuccess error:(NSError **)outerError { 71 | NSError *error = nil; 72 | BOOL success = YES; 73 | 74 | id transformedValue = self.forwardBlock(value, &success, &error); 75 | 76 | if (outerSuccess != NULL) *outerSuccess = success; 77 | if (outerError != NULL) *outerError = error; 78 | 79 | return transformedValue; 80 | } 81 | 82 | @end 83 | 84 | @implementation MTLReversibleValueTransformer 85 | 86 | #pragma mark Lifecycle 87 | 88 | - (id)initWithForwardBlock:(MTLValueTransformerBlock)forwardBlock reverseBlock:(MTLValueTransformerBlock)reverseBlock { 89 | NSParameterAssert(reverseBlock != nil); 90 | return [super initWithForwardBlock:forwardBlock reverseBlock:reverseBlock]; 91 | } 92 | 93 | #pragma mark NSValueTransformer 94 | 95 | + (BOOL)allowsReverseTransformation { 96 | return YES; 97 | } 98 | 99 | - (id)reverseTransformedValue:(id)value { 100 | NSError *error = nil; 101 | BOOL success = YES; 102 | 103 | return self.reverseBlock(value, &success, &error); 104 | } 105 | 106 | - (id)reverseTransformedValue:(id)value success:(BOOL *)outerSuccess error:(NSError **)outerError { 107 | NSError *error = nil; 108 | BOOL success = YES; 109 | 110 | id transformedValue = self.reverseBlock(value, &success, &error); 111 | 112 | if (outerSuccess != NULL) *outerSuccess = success; 113 | if (outerError != NULL) *outerError = error; 114 | 115 | return transformedValue; 116 | } 117 | 118 | @end 119 | 120 | 121 | @implementation MTLValueTransformer (Deprecated) 122 | 123 | #pragma clang diagnostic push 124 | #pragma clang diagnostic ignored "-Wdeprecated-implementations" 125 | 126 | + (instancetype)transformerWithBlock:(id (^)(id))transformationBlock { 127 | return [self transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) { 128 | return transformationBlock(value); 129 | }]; 130 | } 131 | 132 | + (instancetype)reversibleTransformerWithBlock:(id (^)(id))transformationBlock { 133 | return [self transformerUsingReversibleBlock:^(id value, BOOL *success, NSError **error) { 134 | return transformationBlock(value); 135 | }]; 136 | } 137 | 138 | + (instancetype)reversibleTransformerWithForwardBlock:(id (^)(id))forwardBlock reverseBlock:(id (^)(id))reverseBlock { 139 | return [self 140 | transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) { 141 | return forwardBlock(value); 142 | } 143 | reverseBlock:^(id value, BOOL *success, NSError **error) { 144 | return reverseBlock(value); 145 | }]; 146 | } 147 | 148 | #pragma clang diagnostic pop 149 | 150 | @end 151 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/Mantle.h: -------------------------------------------------------------------------------- 1 | // 2 | // Mantle.h 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2012-09-04. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for Mantle. 12 | FOUNDATION_EXPORT double MantleVersionNumber; 13 | 14 | //! Project version string for Mantle. 15 | FOUNDATION_EXPORT const unsigned char MantleVersionString[]; 16 | 17 | #import 18 | #import 19 | #import 20 | #import 21 | #import 22 | #import 23 | #import 24 | #import 25 | #import 26 | #import 27 | #import 28 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MTLManipulationAdditions.h 3 | // Mantle 4 | // 5 | // Created by Josh Abernathy on 9/19/12. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSArray (MTLManipulationAdditions) 12 | 13 | /// The first object in the array or nil if the array is empty. 14 | /// Forwards to `firstObject` which has been first declared in iOS7, but works with iOS4/10.6. 15 | @property (nonatomic, readonly, strong) id mtl_firstObject; 16 | 17 | /// Returns a new array without all instances of the given object. 18 | - (NSArray *)mtl_arrayByRemovingObject:(id)object; 19 | 20 | /// Returns a new array without the first object. If the array is empty, it 21 | /// returns the empty array. 22 | - (NSArray *)mtl_arrayByRemovingFirstObject; 23 | 24 | /// Returns a new array without the last object. If the array is empty, it 25 | /// returns the empty array. 26 | - (NSArray *)mtl_arrayByRemovingLastObject; 27 | 28 | @end 29 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSArray+MTLManipulationAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSArray+MTLManipulationAdditions.m 3 | // Mantle 4 | // 5 | // Created by Josh Abernathy on 9/19/12. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSArray+MTLManipulationAdditions.h" 10 | 11 | @interface NSArray (MTLDeclarations) 12 | 13 | // This declaration is needed so Mantle can be compiled with SDK 6 / 10.8. 14 | - (id)firstObject; 15 | 16 | @end 17 | 18 | @implementation NSArray (MTLManipulationAdditions) 19 | 20 | - (id)mtl_firstObject { 21 | return self.firstObject; 22 | } 23 | 24 | - (instancetype)mtl_arrayByRemovingObject:(id)object { 25 | NSMutableArray *result = [self mutableCopy]; 26 | [result removeObject:object]; 27 | return result; 28 | } 29 | 30 | - (instancetype)mtl_arrayByRemovingFirstObject { 31 | if (self.count == 0) return self; 32 | 33 | return [self subarrayWithRange:NSMakeRange(1, self.count - 1)]; 34 | } 35 | 36 | - (instancetype)mtl_arrayByRemovingLastObject { 37 | if (self.count == 0) return self; 38 | 39 | return [self subarrayWithRange:NSMakeRange(0, self.count - 1)]; 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MTLJSONKeyPath.h 3 | // Mantle 4 | // 5 | // Created by Robert Böhnke on 19/03/14. 6 | // Copyright (c) 2014 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (MTLJSONKeyPath) 12 | 13 | /// Looks up the value of a key path in the receiver. 14 | /// 15 | /// JSONKeyPath - The key path that should be resolved. Every element along this 16 | /// key path needs to be an instance of NSDictionary for the 17 | /// resolving to be successful. 18 | /// success - If not NULL, this will be set to a boolean indicating whether 19 | /// the key path was resolved successfully. 20 | /// error - If not NULL, this may be set to an error that occurs during 21 | /// resolving the value. 22 | /// 23 | /// Returns the value for the key path which may be nil. Clients should inspect 24 | /// the success parameter to decide how to proceed with the result. 25 | - (id)mtl_valueForJSONKeyPath:(NSString *)JSONKeyPath success:(BOOL *)success error:(NSError **)error; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSDictionary+MTLJSONKeyPath.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MTLJSONKeyPath.m 3 | // Mantle 4 | // 5 | // Created by Robert Böhnke on 19/03/14. 6 | // Copyright (c) 2014 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+MTLJSONKeyPath.h" 10 | 11 | #import "MTLJSONAdapter.h" 12 | 13 | @implementation NSDictionary (MTLJSONKeyPath) 14 | 15 | - (id)mtl_valueForJSONKeyPath:(NSString *)JSONKeyPath success:(BOOL *)success error:(NSError **)error { 16 | NSArray *components = [JSONKeyPath componentsSeparatedByString:@"."]; 17 | 18 | id result = self; 19 | for (NSString *component in components) { 20 | // Check the result before resolving the key path component to not 21 | // affect the last value of the path. 22 | if (result == nil || result == NSNull.null) break; 23 | 24 | if (![result isKindOfClass:NSDictionary.class]) { 25 | if (error != NULL) { 26 | NSDictionary *userInfo = @{ 27 | NSLocalizedDescriptionKey: NSLocalizedString(@"Invalid JSON dictionary", @""), 28 | NSLocalizedFailureReasonErrorKey: [NSString stringWithFormat:NSLocalizedString(@"JSON key path %1$@ could not resolved because an incompatible JSON dictionary was supplied: \"%2$@\"", @""), JSONKeyPath, self] 29 | }; 30 | 31 | *error = [NSError errorWithDomain:MTLJSONAdapterErrorDomain code:MTLJSONAdapterErrorInvalidJSONDictionary userInfo:userInfo]; 32 | } 33 | 34 | if (success != NULL) *success = NO; 35 | 36 | return nil; 37 | } 38 | 39 | result = result[component]; 40 | } 41 | 42 | if (success != NULL) *success = YES; 43 | 44 | return result; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MTLManipulationAdditions.h 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2012-09-24. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (MTLManipulationAdditions) 12 | 13 | /// Merges the keys and values from the given dictionary into the receiver. If 14 | /// both the receiver and `dictionary` have a given key, the value from 15 | /// `dictionary` is used. 16 | /// 17 | /// Returns a new dictionary containing the entries of the receiver combined with 18 | /// those of `dictionary`. 19 | - (NSDictionary *)mtl_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary; 20 | 21 | /// Creates a new dictionary with all the entries for the given keys removed from 22 | /// the receiver. 23 | - (NSDictionary *)mtl_dictionaryByRemovingValuesForKeys:(NSArray *)keys; 24 | 25 | @end 26 | 27 | @interface NSDictionary (MTLManipulationAdditions_Deprecated) 28 | 29 | - (NSDictionary *)mtl_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys __attribute__((deprecated("Replaced by -mtl_dictionaryByRemovingValuesForKeys:"))); 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSDictionary+MTLManipulationAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MTLManipulationAdditions.m 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2012-09-24. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSDictionary+MTLManipulationAdditions.h" 10 | 11 | @implementation NSDictionary (MTLManipulationAdditions) 12 | 13 | - (NSDictionary *)mtl_dictionaryByAddingEntriesFromDictionary:(NSDictionary *)dictionary { 14 | NSMutableDictionary *result = [self mutableCopy]; 15 | [result addEntriesFromDictionary:dictionary]; 16 | return result; 17 | } 18 | 19 | - (NSDictionary *)mtl_dictionaryByRemovingValuesForKeys:(NSArray *)keys { 20 | NSMutableDictionary *result = [self mutableCopy]; 21 | [result removeObjectsForKeys:keys]; 22 | return result; 23 | } 24 | 25 | @end 26 | 27 | @implementation NSDictionary (MTLManipulationAdditions_Deprecated) 28 | 29 | #pragma clang diagnostic push 30 | #pragma clang diagnostic ignored "-Wdeprecated" 31 | 32 | - (NSDictionary *)mtl_dictionaryByRemovingEntriesWithKeys:(NSSet *)keys { 33 | return [self mtl_dictionaryByRemovingValuesForKeys:keys.allObjects]; 34 | } 35 | 36 | #pragma clang diagnostic pop 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MTLMappingAdditions.h 3 | // Mantle 4 | // 5 | // Created by Robert Böhnke on 10/31/13. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSDictionary (MTLMappingAdditions) 12 | 13 | /// Creates an identity mapping for serialization. 14 | /// 15 | /// class - A subclass of MTLModel. 16 | /// 17 | /// Returns a dictionary that maps all properties of the given class to 18 | /// themselves. 19 | + (NSDictionary *)mtl_identityPropertyMapWithModel:(Class)modelClass; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSDictionary+MTLMappingAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSDictionary+MTLMappingAdditions.m 3 | // Mantle 4 | // 5 | // Created by Robert Böhnke on 10/31/13. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import "MTLModel.h" 10 | 11 | #import "NSDictionary+MTLMappingAdditions.h" 12 | 13 | @implementation NSDictionary (MTLMappingAdditions) 14 | 15 | + (NSDictionary *)mtl_identityPropertyMapWithModel:(Class)modelClass { 16 | NSCParameterAssert([modelClass isSubclassOfClass:MTLModel.class]); 17 | 18 | NSArray *propertyKeys = [modelClass propertyKeys].allObjects; 19 | 20 | return [NSDictionary dictionaryWithObjects:propertyKeys forKeys:propertyKeys]; 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSError+MTLModelException.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+MTLModelException.h 3 | // Mantle 4 | // 5 | // Created by Robert Böhnke on 7/6/13. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSError (MTLModelException) 12 | 13 | /// Creates a new error for an exception that occurred during updating an 14 | /// MTLModel. 15 | /// 16 | /// exception - The exception that was thrown while updating the model. 17 | /// This argument must not be nil. 18 | /// 19 | /// Returns an error that takes its localized description and failure reason 20 | /// from the exception. 21 | + (instancetype)mtl_modelErrorWithException:(NSException *)exception; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSError+MTLModelException.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSError+MTLModelException.m 3 | // Mantle 4 | // 5 | // Created by Robert Böhnke on 7/6/13. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import "MTLModel.h" 10 | 11 | #import "NSError+MTLModelException.h" 12 | 13 | // The domain for errors originating from MTLModel. 14 | static NSString * const MTLModelErrorDomain = @"MTLModelErrorDomain"; 15 | 16 | // An exception was thrown and caught. 17 | static const NSInteger MTLModelErrorExceptionThrown = 1; 18 | 19 | // Associated with the NSException that was caught. 20 | static NSString * const MTLModelThrownExceptionErrorKey = @"MTLModelThrownException"; 21 | 22 | @implementation NSError (MTLModelException) 23 | 24 | + (instancetype)mtl_modelErrorWithException:(NSException *)exception { 25 | NSParameterAssert(exception != nil); 26 | 27 | NSDictionary *userInfo = @{ 28 | NSLocalizedDescriptionKey: exception.description, 29 | NSLocalizedFailureReasonErrorKey: exception.reason, 30 | MTLModelThrownExceptionErrorKey: exception 31 | }; 32 | 33 | return [NSError errorWithDomain:MTLModelErrorDomain code:MTLModelErrorExceptionThrown userInfo:userInfo]; 34 | } 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MTLComparisonAdditions.h 3 | // Mantle 4 | // 5 | // Created by Josh Vera on 10/26/12. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | // Portions copyright (c) 2011 Bitswift. All rights reserved. 9 | // See the LICENSE file for more information. 10 | // 11 | 12 | #import 13 | 14 | /// Returns whether both objects are identical or equal via -isEqual: 15 | BOOL MTLEqualObjects(id obj1, id obj2); 16 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSObject+MTLComparisonAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSObject+MTLComparisonAdditions.m 3 | // Mantle 4 | // 5 | // Created by Josh Vera on 10/26/12. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | // Portions copyright (c) 2011 Bitswift. All rights reserved. 9 | // See the LICENSE file for more information. 10 | // 11 | 12 | #import "NSObject+MTLComparisonAdditions.h" 13 | 14 | BOOL MTLEqualObjects(id obj1, id obj2) { 15 | return (obj1 == obj2 || [obj1 isEqual:obj2]); 16 | } 17 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSValueTransformer+MTLInversionAdditions.h 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2013-05-18. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface NSValueTransformer (MTLInversionAdditions) 12 | 13 | /// Flips the direction of the receiver's transformation, such that 14 | /// -transformedValue: will become -reverseTransformedValue:, and vice-versa. 15 | /// 16 | /// The receiver must allow reverse transformation. 17 | /// 18 | /// Returns an inverted transformer. 19 | - (NSValueTransformer *)mtl_invertedTransformer; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSValueTransformer+MTLInversionAdditions.m: -------------------------------------------------------------------------------- 1 | // 2 | // NSValueTransformer+MTLInversionAdditions.m 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2013-05-18. 6 | // Copyright (c) 2013 GitHub. All rights reserved. 7 | // 8 | 9 | #import "NSValueTransformer+MTLInversionAdditions.h" 10 | #import "MTLTransformerErrorHandling.h" 11 | #import "MTLValueTransformer.h" 12 | 13 | @implementation NSValueTransformer (MTLInversionAdditions) 14 | 15 | - (NSValueTransformer *)mtl_invertedTransformer { 16 | NSParameterAssert(self.class.allowsReverseTransformation); 17 | 18 | if ([self conformsToProtocol:@protocol(MTLTransformerErrorHandling)]) { 19 | NSParameterAssert([self respondsToSelector:@selector(reverseTransformedValue:success:error:)]); 20 | 21 | id errorHandlingSelf = (id)self; 22 | 23 | return [MTLValueTransformer transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) { 24 | return [errorHandlingSelf reverseTransformedValue:value success:success error:error]; 25 | } reverseBlock:^(id value, BOOL *success, NSError **error) { 26 | return [errorHandlingSelf transformedValue:value success:success error:error]; 27 | }]; 28 | } else { 29 | return [MTLValueTransformer transformerUsingForwardBlock:^(id value, BOOL *success, NSError **error) { 30 | return [self reverseTransformedValue:value]; 31 | } reverseBlock:^(id value, BOOL *success, NSError **error) { 32 | return [self transformedValue:value]; 33 | }]; 34 | } 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/NSValueTransformer+MTLPredefinedTransformerAdditions.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSValueTransformer+MTLPredefinedTransformerAdditions.h 3 | // Mantle 4 | // 5 | // Created by Justin Spahr-Summers on 2012-09-27. 6 | // Copyright (c) 2012 GitHub. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "MTLTransformerErrorHandling.h" 12 | 13 | /// The name for a value transformer that converts strings into URLs and back. 14 | extern NSString * const MTLURLValueTransformerName; 15 | 16 | /// Ensure an NSNumber is backed by __NSCFBoolean/CFBooleanRef 17 | /// 18 | /// NSJSONSerialization, and likely other serialization libraries, ordinarily 19 | /// serialize NSNumbers as numbers, and thus booleans would be serialized as 20 | /// 0/1. The exception is when the NSNumber is backed by __NSCFBoolean, which, 21 | /// though very much an implementation detail, is detected and serialized as a 22 | /// proper boolean. 23 | extern NSString * const MTLBooleanValueTransformerName; 24 | 25 | @interface NSValueTransformer (MTLPredefinedTransformerAdditions) 26 | 27 | /// An optionally reversible transformer which applies the given transformer to 28 | /// each element of an array. 29 | /// 30 | /// transformer - The transformer to apply to each element. If the transformer 31 | /// is reversible, the transformer returned by this method will be 32 | /// reversible. This argument must not be nil. 33 | /// 34 | /// Returns a transformer which applies a transformation to each element of an 35 | /// array. 36 | + (NSValueTransformer *)mtl_arrayMappingTransformerWithTransformer:(NSValueTransformer *)transformer; 37 | 38 | /// A reversible value transformer to transform between the keys and objects of a 39 | /// dictionary. 40 | /// 41 | /// dictionary - The dictionary whose keys and values should be 42 | /// transformed between. This argument must not be nil. 43 | /// defaultValue - The result to fall back to, in case no key matching the 44 | /// input value was found during a forward transformation. 45 | /// reverseDefaultValue - The result to fall back to, in case no value matching 46 | /// the input value was found during a reverse 47 | /// transformation. 48 | /// 49 | /// Can for example be used for transforming between enum values and their string 50 | /// representation. 51 | /// 52 | /// NSValueTransformer *valueTransformer = [NSValueTransformer mtl_valueMappingTransformerWithDictionary:@{ 53 | /// @"foo": @(EnumDataTypeFoo), 54 | /// @"bar": @(EnumDataTypeBar), 55 | /// } defaultValue: @(EnumDataTypeUndefined) reverseDefaultValue: @"undefined"]; 56 | /// 57 | /// Returns a transformer which will map from keys to objects for forward 58 | /// transformations, and from objects to keys for reverse transformations. 59 | + (NSValueTransformer *)mtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary defaultValue:(id)defaultValue reverseDefaultValue:(id)reverseDefaultValue; 60 | 61 | /// Returns a value transformer created by calling 62 | /// `+mtl_valueMappingTransformerWithDictionary:defaultValue:reverseDefaultValue:` 63 | /// with a default value of `nil` and a reverse default value of `nil`. 64 | + (NSValueTransformer *)mtl_valueMappingTransformerWithDictionary:(NSDictionary *)dictionary; 65 | 66 | /// A value transformer that errors if the transformed value are not of the given 67 | /// class. 68 | /// 69 | /// class - The expected class. This argument must not be nil. 70 | /// 71 | /// Returns a transformer which will return an error if the transformed in value 72 | /// is not a member of class. Otherwise, the value is simply passed through. 73 | + (NSValueTransformer *)mtl_validatingTransformerForClass:(Class)modelClass; 74 | 75 | + (NSValueTransformer *)mtl_JSONDictionaryTransformerWithModelClass:(Class)modelClass __attribute__((deprecated("Replaced by +[MTLJSONAdapter dictionaryTransformerWithModelClass:]"))); 76 | 77 | + (NSValueTransformer *)mtl_JSONArrayTransformerWithModelClass:(Class)modelClass __attribute__((deprecated("Replaced by +[MTLJSONAdapter arrayTransformerWithModelClass:]"))); 78 | 79 | @end 80 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/extobjc/EXTKeyPathCoding.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXTKeyPathCoding.h 3 | // extobjc 4 | // 5 | // Created by Justin Spahr-Summers on 19.06.12. 6 | // Copyright (C) 2012 Justin Spahr-Summers. 7 | // Released under the MIT license. 8 | // 9 | 10 | #import 11 | #import "metamacros.h" 12 | 13 | /** 14 | * \@keypath allows compile-time verification of key paths. Given a real object 15 | * receiver and key path: 16 | * 17 | * @code 18 | 19 | NSString *UTF8StringPath = @keypath(str.lowercaseString.UTF8String); 20 | // => @"lowercaseString.UTF8String" 21 | 22 | NSString *versionPath = @keypath(NSObject, version); 23 | // => @"version" 24 | 25 | NSString *lowercaseStringPath = @keypath(NSString.new, lowercaseString); 26 | // => @"lowercaseString" 27 | 28 | * @endcode 29 | * 30 | * ... the macro returns an \c NSString containing all but the first path 31 | * component or argument (e.g., @"lowercaseString.UTF8String", @"version"). 32 | * 33 | * In addition to simply creating a key path, this macro ensures that the key 34 | * path is valid at compile-time (causing a syntax error if not), and supports 35 | * refactoring, such that changing the name of the property will also update any 36 | * uses of \@keypath. 37 | */ 38 | #define keypath(...) \ 39 | metamacro_if_eq(1, metamacro_argcount(__VA_ARGS__))(keypath1(__VA_ARGS__))(keypath2(__VA_ARGS__)) 40 | 41 | #define keypath1(PATH) \ 42 | (((void)(NO && ((void)PATH, NO)), strchr(# PATH, '.') + 1)) 43 | 44 | #define keypath2(OBJ, PATH) \ 45 | (((void)(NO && ((void)OBJ.PATH, NO)), # PATH)) 46 | 47 | /** 48 | * \@collectionKeypath allows compile-time verification of key paths across collections NSArray/NSSet etc. Given a real object 49 | * receiver, collection object receiver and related keypaths: 50 | * 51 | * @code 52 | 53 | NSString *employessFirstNamePath = @collectionKeypath(department.employees, Employee.new, firstName) 54 | // => @"employees.firstName" 55 | 56 | NSString *employessFirstNamePath = @collectionKeypath(Department.new, employees, Employee.new, firstName) 57 | // => @"employees.firstName" 58 | 59 | * @endcode 60 | * 61 | */ 62 | #define collectionKeypath(...) \ 63 | metamacro_if_eq(3, metamacro_argcount(__VA_ARGS__))(collectionKeypath3(__VA_ARGS__))(collectionKeypath4(__VA_ARGS__)) 64 | 65 | #define collectionKeypath3(PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String]) 66 | 67 | #define collectionKeypath4(OBJ, PATH, COLLECTION_OBJECT, COLLECTION_PATH) ([[NSString stringWithFormat:@"%s.%s",keypath(OBJ, PATH), keypath(COLLECTION_OBJECT, COLLECTION_PATH)] UTF8String]) 68 | 69 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/extobjc/EXTRuntimeExtensions.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXTRuntimeExtensions.h 3 | // extobjc 4 | // 5 | // Created by Justin Spahr-Summers on 2011-03-05. 6 | // Copyright (C) 2012 Justin Spahr-Summers. 7 | // Released under the MIT license. 8 | // 9 | 10 | #import 11 | 12 | /** 13 | * Describes the memory management policy of a property. 14 | */ 15 | typedef enum { 16 | /** 17 | * The value is assigned. 18 | */ 19 | mtl_propertyMemoryManagementPolicyAssign = 0, 20 | 21 | /** 22 | * The value is retained. 23 | */ 24 | mtl_propertyMemoryManagementPolicyRetain, 25 | 26 | /** 27 | * The value is copied. 28 | */ 29 | mtl_propertyMemoryManagementPolicyCopy 30 | } mtl_propertyMemoryManagementPolicy; 31 | 32 | /** 33 | * Describes the attributes and type information of a property. 34 | */ 35 | typedef struct { 36 | /** 37 | * Whether this property was declared with the \c readonly attribute. 38 | */ 39 | BOOL readonly; 40 | 41 | /** 42 | * Whether this property was declared with the \c nonatomic attribute. 43 | */ 44 | BOOL nonatomic; 45 | 46 | /** 47 | * Whether the property is a weak reference. 48 | */ 49 | BOOL weak; 50 | 51 | /** 52 | * Whether the property is eligible for garbage collection. 53 | */ 54 | BOOL canBeCollected; 55 | 56 | /** 57 | * Whether this property is defined with \c \@dynamic. 58 | */ 59 | BOOL dynamic; 60 | 61 | /** 62 | * The memory management policy for this property. This will always be 63 | * #mtl_propertyMemoryManagementPolicyAssign if #readonly is \c YES. 64 | */ 65 | mtl_propertyMemoryManagementPolicy memoryManagementPolicy; 66 | 67 | /** 68 | * The selector for the getter of this property. This will reflect any 69 | * custom \c getter= attribute provided in the property declaration, or the 70 | * inferred getter name otherwise. 71 | */ 72 | SEL getter; 73 | 74 | /** 75 | * The selector for the setter of this property. This will reflect any 76 | * custom \c setter= attribute provided in the property declaration, or the 77 | * inferred setter name otherwise. 78 | * 79 | * @note If #readonly is \c YES, this value will represent what the setter 80 | * \e would be, if the property were writable. 81 | */ 82 | SEL setter; 83 | 84 | /** 85 | * The backing instance variable for this property, or \c NULL if \c 86 | * \c @synthesize was not used, and therefore no instance variable exists. This 87 | * would also be the case if the property is implemented dynamically. 88 | */ 89 | const char *ivar; 90 | 91 | /** 92 | * If this property is defined as being an instance of a specific class, 93 | * this will be the class object representing it. 94 | * 95 | * This will be \c nil if the property was defined as type \c id, if the 96 | * property is not of an object type, or if the class could not be found at 97 | * runtime. 98 | */ 99 | Class objectClass; 100 | 101 | /** 102 | * The type encoding for the value of this property. This is the type as it 103 | * would be returned by the \c \@encode() directive. 104 | */ 105 | char type[]; 106 | } mtl_propertyAttributes; 107 | 108 | /** 109 | * Returns a pointer to a structure containing information about \a property. 110 | * You must \c free() the returned pointer. Returns \c NULL if there is an error 111 | * obtaining information from \a property. 112 | */ 113 | mtl_propertyAttributes *mtl_copyPropertyAttributes (objc_property_t property); 114 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/extobjc/EXTScope.h: -------------------------------------------------------------------------------- 1 | // 2 | // EXTScope.h 3 | // extobjc 4 | // 5 | // Created by Justin Spahr-Summers on 2011-05-04. 6 | // Copyright (C) 2012 Justin Spahr-Summers. 7 | // Released under the MIT license. 8 | // 9 | 10 | #import "metamacros.h" 11 | 12 | /** 13 | * \@onExit defines some code to be executed when the current scope exits. The 14 | * code must be enclosed in braces and terminated with a semicolon, and will be 15 | * executed regardless of how the scope is exited, including from exceptions, 16 | * \c goto, \c return, \c break, and \c continue. 17 | * 18 | * Provided code will go into a block to be executed later. Keep this in mind as 19 | * it pertains to memory management, restrictions on assignment, etc. Because 20 | * the code is used within a block, \c return is a legal (though perhaps 21 | * confusing) way to exit the cleanup block early. 22 | * 23 | * Multiple \@onExit statements in the same scope are executed in reverse 24 | * lexical order. This helps when pairing resource acquisition with \@onExit 25 | * statements, as it guarantees teardown in the opposite order of acquisition. 26 | * 27 | * @note This statement cannot be used within scopes defined without braces 28 | * (like a one line \c if). In practice, this is not an issue, since \@onExit is 29 | * a useless construct in such a case anyways. 30 | */ 31 | #define onExit \ 32 | try {} @finally {} \ 33 | __strong mtl_cleanupBlock_t metamacro_concat(mtl_exitBlock_, __LINE__) __attribute__((cleanup(mtl_executeCleanupBlock), unused)) = ^ 34 | 35 | /** 36 | * Creates \c __weak shadow variables for each of the variables provided as 37 | * arguments, which can later be made strong again with #strongify. 38 | * 39 | * This is typically used to weakly reference variables in a block, but then 40 | * ensure that the variables stay alive during the actual execution of the block 41 | * (if they were live upon entry). 42 | * 43 | * See #strongify for an example of usage. 44 | */ 45 | #define weakify(...) \ 46 | try {} @finally {} \ 47 | metamacro_foreach_cxt(mtl_weakify_,, __weak, __VA_ARGS__) 48 | 49 | /** 50 | * Like #weakify, but uses \c __unsafe_unretained instead, for targets or 51 | * classes that do not support weak references. 52 | */ 53 | #define unsafeify(...) \ 54 | try {} @finally {} \ 55 | metamacro_foreach_cxt(mtl_weakify_,, __unsafe_unretained, __VA_ARGS__) 56 | 57 | /** 58 | * Strongly references each of the variables provided as arguments, which must 59 | * have previously been passed to #weakify. 60 | * 61 | * The strong references created will shadow the original variable names, such 62 | * that the original names can be used without issue (and a significantly 63 | * reduced risk of retain cycles) in the current scope. 64 | * 65 | * @code 66 | 67 | id foo = [[NSObject alloc] init]; 68 | id bar = [[NSObject alloc] init]; 69 | 70 | @weakify(foo, bar); 71 | 72 | // this block will not keep 'foo' or 'bar' alive 73 | BOOL (^matchesFooOrBar)(id) = ^ BOOL (id obj){ 74 | // but now, upon entry, 'foo' and 'bar' will stay alive until the block has 75 | // finished executing 76 | @strongify(foo, bar); 77 | 78 | return [foo isEqual:obj] || [bar isEqual:obj]; 79 | }; 80 | 81 | * @endcode 82 | */ 83 | #define strongify(...) \ 84 | try {} @finally {} \ 85 | _Pragma("clang diagnostic push") \ 86 | _Pragma("clang diagnostic ignored \"-Wshadow\"") \ 87 | metamacro_foreach(mtl_strongify_,, __VA_ARGS__) \ 88 | _Pragma("clang diagnostic pop") 89 | 90 | /*** implementation details follow ***/ 91 | typedef void (^mtl_cleanupBlock_t)(); 92 | 93 | void mtl_executeCleanupBlock (__strong mtl_cleanupBlock_t *block); 94 | 95 | #define mtl_weakify_(INDEX, CONTEXT, VAR) \ 96 | CONTEXT __typeof__(VAR) metamacro_concat(VAR, _weak_) = (VAR); 97 | 98 | #define mtl_strongify_(INDEX, VAR) \ 99 | __strong __typeof__(VAR) VAR = metamacro_concat(VAR, _weak_); 100 | -------------------------------------------------------------------------------- /xiachufang/Pods/Mantle/Mantle/extobjc/EXTScope.m: -------------------------------------------------------------------------------- 1 | // 2 | // EXTScope.m 3 | // extobjc 4 | // 5 | // Created by Justin Spahr-Summers on 2011-05-04. 6 | // Copyright (C) 2012 Justin Spahr-Summers. 7 | // Released under the MIT license. 8 | // 9 | 10 | #import "EXTScope.h" 11 | 12 | void mtl_executeCleanupBlock (__strong mtl_cleanupBlock_t *block) { 13 | (*block)(); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/denglanfeng.xcuserdatad/xcschemes/AFNetworking.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 47 | 48 | 54 | 55 | 57 | 58 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/denglanfeng.xcuserdatad/xcschemes/Mantle.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 47 | 48 | 54 | 55 | 57 | 58 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/denglanfeng.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 47 | 48 | 54 | 55 | 57 | 58 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/denglanfeng.xcuserdatad/xcschemes/SDWebImage.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 47 | 48 | 54 | 55 | 57 | 58 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/denglanfeng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AFNetworking.xcscheme 8 | 9 | isShown 10 | 11 | 12 | Mantle.xcscheme 13 | 14 | isShown 15 | 16 | 17 | Pods.xcscheme 18 | 19 | isShown 20 | 21 | 22 | SDWebImage.xcscheme 23 | 24 | isShown 25 | 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 5352D432641F0656C90741034E32F31E 31 | 32 | primary 33 | 34 | 35 | 6107FC1501DBFC299C8DF0718F7D4414 36 | 37 | primary 38 | 39 | 40 | 6327A47ACFE5CA3F7E477567EBC36DD6 41 | 42 | primary 43 | 44 | 45 | DA6B5589093F6B8287F0E635A0CF5789 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/zangqilong.xcuserdatad/xcschemes/AFNetworking.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/zangqilong.xcuserdatad/xcschemes/Mantle.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/zangqilong.xcuserdatad/xcschemes/Pods.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/zangqilong.xcuserdatad/xcschemes/SDWebImage.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 34 | 35 | 45 | 46 | 52 | 53 | 54 | 55 | 56 | 57 | 63 | 64 | 70 | 71 | 72 | 73 | 75 | 76 | 79 | 80 | 81 | -------------------------------------------------------------------------------- /xiachufang/Pods/Pods.xcodeproj/xcuserdata/zangqilong.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AFNetworking.xcscheme 8 | 9 | orderHint 10 | 1 11 | 12 | Mantle.xcscheme 13 | 14 | orderHint 15 | 2 16 | 17 | Pods.xcscheme 18 | 19 | orderHint 20 | 3 21 | 22 | SDWebImage.xcscheme 23 | 24 | orderHint 25 | 4 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 5352D432641F0656C90741034E32F31E 31 | 32 | primary 33 | 34 | 35 | 6107FC1501DBFC299C8DF0718F7D4414 36 | 37 | primary 38 | 39 | 40 | 6327A47ACFE5CA3F7E477567EBC36DD6 41 | 42 | primary 43 | 44 | 45 | DA6B5589093F6B8287F0E635A0CF5789 46 | 47 | primary 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2009 Olivier Poitrey 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | 21 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Fabrice Aneche on 06/01/14. 3 | // Copyright (c) 2014 Dailymotion. All rights reserved. 4 | // 5 | 6 | #import 7 | 8 | @interface NSData (ImageContentType) 9 | 10 | /** 11 | * Compute the content type for an image data 12 | * 13 | * @param data the input data 14 | * 15 | * @return the content type as string (i.e. image/jpeg, image/gif) 16 | */ 17 | + (NSString *)sd_contentTypeForImageData:(NSData *)data; 18 | 19 | @end 20 | 21 | 22 | @interface NSData (ImageContentTypeDeprecated) 23 | 24 | + (NSString *)contentTypeForImageData:(NSData *)data __deprecated_msg("Use `sd_contentTypeForImageData:`"); 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/NSData+ImageContentType.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Fabrice Aneche on 06/01/14. 3 | // Copyright (c) 2014 Dailymotion. All rights reserved. 4 | // 5 | 6 | #import "NSData+ImageContentType.h" 7 | 8 | 9 | @implementation NSData (ImageContentType) 10 | 11 | + (NSString *)sd_contentTypeForImageData:(NSData *)data { 12 | uint8_t c; 13 | [data getBytes:&c length:1]; 14 | switch (c) { 15 | case 0xFF: 16 | return @"image/jpeg"; 17 | case 0x89: 18 | return @"image/png"; 19 | case 0x47: 20 | return @"image/gif"; 21 | case 0x49: 22 | case 0x4D: 23 | return @"image/tiff"; 24 | case 0x52: 25 | // R as RIFF for WEBP 26 | if ([data length] < 12) { 27 | return nil; 28 | } 29 | 30 | NSString *testString = [[NSString alloc] initWithData:[data subdataWithRange:NSMakeRange(0, 12)] encoding:NSASCIIStringEncoding]; 31 | if ([testString hasPrefix:@"RIFF"] && [testString hasSuffix:@"WEBP"]) { 32 | return @"image/webp"; 33 | } 34 | 35 | return nil; 36 | } 37 | return nil; 38 | } 39 | 40 | @end 41 | 42 | 43 | @implementation NSData (ImageContentTypeDeprecated) 44 | 45 | + (NSString *)contentTypeForImageData:(NSData *)data { 46 | return [self sd_contentTypeForImageData:data]; 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/SDWebImageCompat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * (c) Jamie Pinkham 5 | * 6 | * For the full copyright and license information, please view the LICENSE 7 | * file that was distributed with this source code. 8 | */ 9 | 10 | #import 11 | 12 | #ifdef __OBJC_GC__ 13 | #error SDWebImage does not support Objective-C Garbage Collection 14 | #endif 15 | 16 | #if __IPHONE_OS_VERSION_MIN_REQUIRED != 20000 && __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_5_0 17 | #error SDWebImage doesn't support Deployement Target version < 5.0 18 | #endif 19 | 20 | #if !TARGET_OS_IPHONE 21 | #import 22 | #ifndef UIImage 23 | #define UIImage NSImage 24 | #endif 25 | #ifndef UIImageView 26 | #define UIImageView NSImageView 27 | #endif 28 | #else 29 | 30 | #import 31 | 32 | #endif 33 | 34 | #ifndef NS_ENUM 35 | #define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type 36 | #endif 37 | 38 | #ifndef NS_OPTIONS 39 | #define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type 40 | #endif 41 | 42 | #if OS_OBJECT_USE_OBJC 43 | #undef SDDispatchQueueRelease 44 | #undef SDDispatchQueueSetterSementics 45 | #define SDDispatchQueueRelease(q) 46 | #define SDDispatchQueueSetterSementics strong 47 | #else 48 | #undef SDDispatchQueueRelease 49 | #undef SDDispatchQueueSetterSementics 50 | #define SDDispatchQueueRelease(q) (dispatch_release(q)) 51 | #define SDDispatchQueueSetterSementics assign 52 | #endif 53 | 54 | extern UIImage *SDScaledImageForKey(NSString *key, UIImage *image); 55 | 56 | typedef void(^SDWebImageNoParamsBlock)(); 57 | 58 | extern NSString *const SDWebImageErrorDomain; 59 | 60 | #define dispatch_main_sync_safe(block)\ 61 | if ([NSThread isMainThread]) {\ 62 | block();\ 63 | } else {\ 64 | dispatch_sync(dispatch_get_main_queue(), block);\ 65 | } 66 | 67 | #define dispatch_main_async_safe(block)\ 68 | if ([NSThread isMainThread]) {\ 69 | block();\ 70 | } else {\ 71 | dispatch_async(dispatch_get_main_queue(), block);\ 72 | } 73 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/SDWebImageCompat.m: -------------------------------------------------------------------------------- 1 | // 2 | // SDWebImageCompat.m 3 | // SDWebImage 4 | // 5 | // Created by Olivier Poitrey on 11/12/12. 6 | // Copyright (c) 2012 Dailymotion. All rights reserved. 7 | // 8 | 9 | #import "SDWebImageCompat.h" 10 | 11 | #if !__has_feature(objc_arc) 12 | #error SDWebImage is ARC only. Either turn on ARC for the project or use -fobjc-arc flag 13 | #endif 14 | 15 | inline UIImage *SDScaledImageForKey(NSString *key, UIImage *image) { 16 | if (!image) { 17 | return nil; 18 | } 19 | 20 | if ([image.images count] > 0) { 21 | NSMutableArray *scaledImages = [NSMutableArray array]; 22 | 23 | for (UIImage *tempImage in image.images) { 24 | [scaledImages addObject:SDScaledImageForKey(key, tempImage)]; 25 | } 26 | 27 | return [UIImage animatedImageWithImages:scaledImages duration:image.duration]; 28 | } 29 | else { 30 | if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { 31 | CGFloat scale = 1.0; 32 | if (key.length >= 8) { 33 | NSRange range = [key rangeOfString:@"@2x."]; 34 | if (range.location != NSNotFound) { 35 | scale = 2.0; 36 | } 37 | 38 | range = [key rangeOfString:@"@3x."]; 39 | if (range.location != NSNotFound) { 40 | scale = 3.0; 41 | } 42 | } 43 | 44 | UIImage *scaledImage = [[UIImage alloc] initWithCGImage:image.CGImage scale:scale orientation:image.imageOrientation]; 45 | image = scaledImage; 46 | } 47 | return image; 48 | } 49 | } 50 | 51 | NSString *const SDWebImageErrorDomain = @"SDWebImageErrorDomain"; 52 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * Created by james on 9/28/11. 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | #import 12 | #import "SDWebImageCompat.h" 13 | 14 | @interface UIImage (ForceDecode) 15 | 16 | + (UIImage *)decodedImageWithImage:(UIImage *)image; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/SDWebImageDecoder.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * Created by james on 9/28/11. 6 | * 7 | * For the full copyright and license information, please view the LICENSE 8 | * file that was distributed with this source code. 9 | */ 10 | 11 | #import "SDWebImageDecoder.h" 12 | 13 | @implementation UIImage (ForceDecode) 14 | 15 | + (UIImage *)decodedImageWithImage:(UIImage *)image { 16 | if (image.images) { 17 | // Do not decode animated images 18 | return image; 19 | } 20 | 21 | CGImageRef imageRef = image.CGImage; 22 | CGSize imageSize = CGSizeMake(CGImageGetWidth(imageRef), CGImageGetHeight(imageRef)); 23 | CGRect imageRect = (CGRect){.origin = CGPointZero, .size = imageSize}; 24 | 25 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 26 | CGBitmapInfo bitmapInfo = CGImageGetBitmapInfo(imageRef); 27 | 28 | int infoMask = (bitmapInfo & kCGBitmapAlphaInfoMask); 29 | BOOL anyNonAlpha = (infoMask == kCGImageAlphaNone || 30 | infoMask == kCGImageAlphaNoneSkipFirst || 31 | infoMask == kCGImageAlphaNoneSkipLast); 32 | 33 | // CGBitmapContextCreate doesn't support kCGImageAlphaNone with RGB. 34 | // https://developer.apple.com/library/mac/#qa/qa1037/_index.html 35 | if (infoMask == kCGImageAlphaNone && CGColorSpaceGetNumberOfComponents(colorSpace) > 1) { 36 | // Unset the old alpha info. 37 | bitmapInfo &= ~kCGBitmapAlphaInfoMask; 38 | 39 | // Set noneSkipFirst. 40 | bitmapInfo |= kCGImageAlphaNoneSkipFirst; 41 | } 42 | // Some PNGs tell us they have alpha but only 3 components. Odd. 43 | else if (!anyNonAlpha && CGColorSpaceGetNumberOfComponents(colorSpace) == 3) { 44 | // Unset the old alpha info. 45 | bitmapInfo &= ~kCGBitmapAlphaInfoMask; 46 | bitmapInfo |= kCGImageAlphaPremultipliedFirst; 47 | } 48 | 49 | // It calculates the bytes-per-row based on the bitsPerComponent and width arguments. 50 | CGContextRef context = CGBitmapContextCreate(NULL, 51 | imageSize.width, 52 | imageSize.height, 53 | CGImageGetBitsPerComponent(imageRef), 54 | 0, 55 | colorSpace, 56 | bitmapInfo); 57 | CGColorSpaceRelease(colorSpace); 58 | 59 | // If failed, return undecompressed image 60 | if (!context) return image; 61 | 62 | CGContextDrawImage(context, imageRect, imageRef); 63 | CGImageRef decompressedImageRef = CGBitmapContextCreateImage(context); 64 | 65 | CGContextRelease(context); 66 | 67 | UIImage *decompressedImage = [UIImage imageWithCGImage:decompressedImageRef scale:image.scale orientation:image.imageOrientation]; 68 | CGImageRelease(decompressedImageRef); 69 | return decompressedImage; 70 | } 71 | 72 | @end 73 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/SDWebImageDownloaderOperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageDownloader.h" 11 | #import "SDWebImageOperation.h" 12 | 13 | extern NSString *const SDWebImageDownloadStartNotification; 14 | extern NSString *const SDWebImageDownloadReceiveResponseNotification; 15 | extern NSString *const SDWebImageDownloadStopNotification; 16 | extern NSString *const SDWebImageDownloadFinishNotification; 17 | 18 | @interface SDWebImageDownloaderOperation : NSOperation 19 | 20 | /** 21 | * The request used by the operation's connection. 22 | */ 23 | @property (strong, nonatomic, readonly) NSURLRequest *request; 24 | 25 | 26 | @property (assign, nonatomic) BOOL shouldDecompressImages; 27 | 28 | /** 29 | * Whether the URL connection should consult the credential storage for authenticating the connection. `YES` by default. 30 | * 31 | * This is the value that is returned in the `NSURLConnectionDelegate` method `-connectionShouldUseCredentialStorage:`. 32 | */ 33 | @property (nonatomic, assign) BOOL shouldUseCredentialStorage; 34 | 35 | /** 36 | * The credential used for authentication challenges in `-connection:didReceiveAuthenticationChallenge:`. 37 | * 38 | * This will be overridden by any shared credentials that exist for the username or password of the request URL, if present. 39 | */ 40 | @property (nonatomic, strong) NSURLCredential *credential; 41 | 42 | /** 43 | * The SDWebImageDownloaderOptions for the receiver. 44 | */ 45 | @property (assign, nonatomic, readonly) SDWebImageDownloaderOptions options; 46 | 47 | /** 48 | * The expected size of data. 49 | */ 50 | @property (assign, nonatomic) NSInteger expectedSize; 51 | 52 | /** 53 | * The response returned by the operation's connection. 54 | */ 55 | @property (strong, nonatomic) NSURLResponse *response; 56 | 57 | /** 58 | * Initializes a `SDWebImageDownloaderOperation` object 59 | * 60 | * @see SDWebImageDownloaderOperation 61 | * 62 | * @param request the URL request 63 | * @param options downloader options 64 | * @param progressBlock the block executed when a new chunk of data arrives. 65 | * @note the progress block is executed on a background queue 66 | * @param completedBlock the block executed when the download is done. 67 | * @note the completed block is executed on the main queue for success. If errors are found, there is a chance the block will be executed on a background queue 68 | * @param cancelBlock the block executed if the download (operation) is cancelled 69 | * 70 | * @return the initialized instance 71 | */ 72 | - (id)initWithRequest:(NSURLRequest *)request 73 | options:(SDWebImageDownloaderOptions)options 74 | progress:(SDWebImageDownloaderProgressBlock)progressBlock 75 | completed:(SDWebImageDownloaderCompletedBlock)completedBlock 76 | cancelled:(SDWebImageNoParamsBlock)cancelBlock; 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/SDWebImageOperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | 11 | @protocol SDWebImageOperation 12 | 13 | - (void)cancel; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/SDWebImagePrefetcher.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageManager.h" 11 | 12 | @class SDWebImagePrefetcher; 13 | 14 | @protocol SDWebImagePrefetcherDelegate 15 | 16 | @optional 17 | 18 | /** 19 | * Called when an image was prefetched. 20 | * 21 | * @param imagePrefetcher The current image prefetcher 22 | * @param imageURL The image url that was prefetched 23 | * @param finishedCount The total number of images that were prefetched (successful or not) 24 | * @param totalCount The total number of images that were to be prefetched 25 | */ 26 | - (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didPrefetchURL:(NSURL *)imageURL finishedCount:(NSUInteger)finishedCount totalCount:(NSUInteger)totalCount; 27 | 28 | /** 29 | * Called when all images are prefetched. 30 | * @param imagePrefetcher The current image prefetcher 31 | * @param totalCount The total number of images that were prefetched (whether successful or not) 32 | * @param skippedCount The total number of images that were skipped 33 | */ 34 | - (void)imagePrefetcher:(SDWebImagePrefetcher *)imagePrefetcher didFinishWithTotalCount:(NSUInteger)totalCount skippedCount:(NSUInteger)skippedCount; 35 | 36 | @end 37 | 38 | typedef void(^SDWebImagePrefetcherProgressBlock)(NSUInteger noOfFinishedUrls, NSUInteger noOfTotalUrls); 39 | typedef void(^SDWebImagePrefetcherCompletionBlock)(NSUInteger noOfFinishedUrls, NSUInteger noOfSkippedUrls); 40 | 41 | /** 42 | * Prefetch some URLs in the cache for future use. Images are downloaded in low priority. 43 | */ 44 | @interface SDWebImagePrefetcher : NSObject 45 | 46 | /** 47 | * The web image manager 48 | */ 49 | @property (strong, nonatomic, readonly) SDWebImageManager *manager; 50 | 51 | /** 52 | * Maximum number of URLs to prefetch at the same time. Defaults to 3. 53 | */ 54 | @property (nonatomic, assign) NSUInteger maxConcurrentDownloads; 55 | 56 | /** 57 | * SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority. 58 | */ 59 | @property (nonatomic, assign) SDWebImageOptions options; 60 | 61 | /** 62 | * Queue options for Prefetcher. Defaults to Main Queue. 63 | */ 64 | @property (nonatomic, assign) dispatch_queue_t prefetcherQueue; 65 | 66 | @property (weak, nonatomic) id delegate; 67 | 68 | /** 69 | * Return the global image prefetcher instance. 70 | */ 71 | + (SDWebImagePrefetcher *)sharedImagePrefetcher; 72 | 73 | /** 74 | * Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, 75 | * currently one image is downloaded at a time, 76 | * and skips images for failed downloads and proceed to the next image in the list 77 | * 78 | * @param urls list of URLs to prefetch 79 | */ 80 | - (void)prefetchURLs:(NSArray *)urls; 81 | 82 | /** 83 | * Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching, 84 | * currently one image is downloaded at a time, 85 | * and skips images for failed downloads and proceed to the next image in the list 86 | * 87 | * @param urls list of URLs to prefetch 88 | * @param progressBlock block to be called when progress updates; 89 | * first parameter is the number of completed (successful or not) requests, 90 | * second parameter is the total number of images originally requested to be prefetched 91 | * @param completionBlock block to be called when prefetching is completed 92 | * first param is the number of completed (successful or not) requests, 93 | * second parameter is the number of skipped requests 94 | */ 95 | - (void)prefetchURLs:(NSArray *)urls progress:(SDWebImagePrefetcherProgressBlock)progressBlock completed:(SDWebImagePrefetcherCompletionBlock)completionBlock; 96 | 97 | /** 98 | * Remove and cancel queued list 99 | */ 100 | - (void)cancelPrefetching; 101 | 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/UIImage+GIF.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+GIF.h 3 | // LBGIFImage 4 | // 5 | // Created by Laurin Brandner on 06.01.12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (GIF) 12 | 13 | + (UIImage *)sd_animatedGIFNamed:(NSString *)name; 14 | 15 | + (UIImage *)sd_animatedGIFWithData:(NSData *)data; 16 | 17 | - (UIImage *)sd_animatedImageByScalingAndCroppingToSize:(CGSize)size; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+MultiFormat.h 3 | // SDWebImage 4 | // 5 | // Created by Olivier Poitrey on 07/06/13. 6 | // Copyright (c) 2013 Dailymotion. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIImage (MultiFormat) 12 | 13 | + (UIImage *)sd_imageWithData:(NSData *)data; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/UIImage+MultiFormat.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIImage+MultiFormat.m 3 | // SDWebImage 4 | // 5 | // Created by Olivier Poitrey on 07/06/13. 6 | // Copyright (c) 2013 Dailymotion. All rights reserved. 7 | // 8 | 9 | #import "UIImage+MultiFormat.h" 10 | #import "UIImage+GIF.h" 11 | #import "NSData+ImageContentType.h" 12 | #import 13 | 14 | #ifdef SD_WEBP 15 | #import "UIImage+WebP.h" 16 | #endif 17 | 18 | @implementation UIImage (MultiFormat) 19 | 20 | + (UIImage *)sd_imageWithData:(NSData *)data { 21 | if (!data) { 22 | return nil; 23 | } 24 | 25 | UIImage *image; 26 | NSString *imageContentType = [NSData sd_contentTypeForImageData:data]; 27 | if ([imageContentType isEqualToString:@"image/gif"]) { 28 | image = [UIImage sd_animatedGIFWithData:data]; 29 | } 30 | #ifdef SD_WEBP 31 | else if ([imageContentType isEqualToString:@"image/webp"]) 32 | { 33 | image = [UIImage sd_imageWithWebPData:data]; 34 | } 35 | #endif 36 | else { 37 | image = [[UIImage alloc] initWithData:data]; 38 | UIImageOrientation orientation = [self sd_imageOrientationFromImageData:data]; 39 | if (orientation != UIImageOrientationUp) { 40 | image = [UIImage imageWithCGImage:image.CGImage 41 | scale:image.scale 42 | orientation:orientation]; 43 | } 44 | } 45 | 46 | 47 | return image; 48 | } 49 | 50 | 51 | +(UIImageOrientation)sd_imageOrientationFromImageData:(NSData *)imageData { 52 | UIImageOrientation result = UIImageOrientationUp; 53 | CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)imageData, NULL); 54 | if (imageSource) { 55 | CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(imageSource, 0, NULL); 56 | if (properties) { 57 | CFTypeRef val; 58 | int exifOrientation; 59 | val = CFDictionaryGetValue(properties, kCGImagePropertyOrientation); 60 | if (val) { 61 | CFNumberGetValue(val, kCFNumberIntType, &exifOrientation); 62 | result = [self sd_exifOrientationToiOSOrientation:exifOrientation]; 63 | } // else - if it's not set it remains at up 64 | CFRelease((CFTypeRef) properties); 65 | } else { 66 | //NSLog(@"NO PROPERTIES, FAIL"); 67 | } 68 | CFRelease(imageSource); 69 | } 70 | return result; 71 | } 72 | 73 | #pragma mark EXIF orientation tag converter 74 | // Convert an EXIF image orientation to an iOS one. 75 | // reference see here: http://sylvana.net/jpegcrop/exif_orientation.html 76 | + (UIImageOrientation) sd_exifOrientationToiOSOrientation:(int)exifOrientation { 77 | UIImageOrientation orientation = UIImageOrientationUp; 78 | switch (exifOrientation) { 79 | case 1: 80 | orientation = UIImageOrientationUp; 81 | break; 82 | 83 | case 3: 84 | orientation = UIImageOrientationDown; 85 | break; 86 | 87 | case 8: 88 | orientation = UIImageOrientationLeft; 89 | break; 90 | 91 | case 6: 92 | orientation = UIImageOrientationRight; 93 | break; 94 | 95 | case 2: 96 | orientation = UIImageOrientationUpMirrored; 97 | break; 98 | 99 | case 4: 100 | orientation = UIImageOrientationDownMirrored; 101 | break; 102 | 103 | case 5: 104 | orientation = UIImageOrientationLeftMirrored; 105 | break; 106 | 107 | case 7: 108 | orientation = UIImageOrientationRightMirrored; 109 | break; 110 | default: 111 | break; 112 | } 113 | return orientation; 114 | } 115 | 116 | 117 | 118 | @end 119 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/UIImageView+HighlightedWebCache.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "UIImageView+HighlightedWebCache.h" 10 | #import "UIView+WebCacheOperation.h" 11 | 12 | #define UIImageViewHighlightedWebCacheOperationKey @"highlightedImage" 13 | 14 | @implementation UIImageView (HighlightedWebCache) 15 | 16 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url { 17 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil]; 18 | } 19 | 20 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options { 21 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; 22 | } 23 | 24 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletionBlock)completedBlock { 25 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:completedBlock]; 26 | } 27 | 28 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletionBlock)completedBlock { 29 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:completedBlock]; 30 | } 31 | 32 | - (void)sd_setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock { 33 | [self sd_cancelCurrentHighlightedImageLoad]; 34 | 35 | if (url) { 36 | __weak __typeof(self)wself = self; 37 | id operation = [SDWebImageManager.sharedManager downloadImageWithURL:url options:options progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) { 38 | if (!wself) return; 39 | dispatch_main_sync_safe (^ 40 | { 41 | if (!wself) return; 42 | if (image) { 43 | wself.highlightedImage = image; 44 | [wself setNeedsLayout]; 45 | } 46 | if (completedBlock && finished) { 47 | completedBlock(image, error, cacheType, url); 48 | } 49 | }); 50 | }]; 51 | [self sd_setImageLoadOperation:operation forKey:UIImageViewHighlightedWebCacheOperationKey]; 52 | } else { 53 | dispatch_main_async_safe(^{ 54 | NSError *error = [NSError errorWithDomain:SDWebImageErrorDomain code:-1 userInfo:@{NSLocalizedDescriptionKey : @"Trying to load a nil url"}]; 55 | if (completedBlock) { 56 | completedBlock(nil, error, SDImageCacheTypeNone, url); 57 | } 58 | }); 59 | } 60 | } 61 | 62 | - (void)sd_cancelCurrentHighlightedImageLoad { 63 | [self sd_cancelImageLoadOperationWithKey:UIImageViewHighlightedWebCacheOperationKey]; 64 | } 65 | 66 | @end 67 | 68 | 69 | @implementation UIImageView (HighlightedWebCacheDeprecated) 70 | 71 | - (void)setHighlightedImageWithURL:(NSURL *)url { 72 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:nil]; 73 | } 74 | 75 | - (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options { 76 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:nil]; 77 | } 78 | 79 | - (void)setHighlightedImageWithURL:(NSURL *)url completed:(SDWebImageCompletedBlock)completedBlock { 80 | [self sd_setHighlightedImageWithURL:url options:0 progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { 81 | if (completedBlock) { 82 | completedBlock(image, error, cacheType); 83 | } 84 | }]; 85 | } 86 | 87 | - (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock { 88 | [self sd_setHighlightedImageWithURL:url options:options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { 89 | if (completedBlock) { 90 | completedBlock(image, error, cacheType); 91 | } 92 | }]; 93 | } 94 | 95 | - (void)setHighlightedImageWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedBlock)completedBlock { 96 | [self sd_setHighlightedImageWithURL:url options:0 progress:progressBlock completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) { 97 | if (completedBlock) { 98 | completedBlock(image, error, cacheType); 99 | } 100 | }]; 101 | } 102 | 103 | - (void)cancelCurrentHighlightedImageLoad { 104 | [self sd_cancelCurrentHighlightedImageLoad]; 105 | } 106 | 107 | @end 108 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import 10 | #import "SDWebImageManager.h" 11 | 12 | @interface UIView (WebCacheOperation) 13 | 14 | /** 15 | * Set the image load operation (storage in a UIView based dictionary) 16 | * 17 | * @param operation the operation 18 | * @param key key for storing the operation 19 | */ 20 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key; 21 | 22 | /** 23 | * Cancel all operations for the current UIView and key 24 | * 25 | * @param key key for identifying the operations 26 | */ 27 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key; 28 | 29 | /** 30 | * Just remove the operations corresponding to the current UIView and key without cancelling them 31 | * 32 | * @param key key for identifying the operations 33 | */ 34 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key; 35 | 36 | @end 37 | -------------------------------------------------------------------------------- /xiachufang/Pods/SDWebImage/SDWebImage/UIView+WebCacheOperation.m: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the SDWebImage package. 3 | * (c) Olivier Poitrey 4 | * 5 | * For the full copyright and license information, please view the LICENSE 6 | * file that was distributed with this source code. 7 | */ 8 | 9 | #import "UIView+WebCacheOperation.h" 10 | #import "objc/runtime.h" 11 | 12 | static char loadOperationKey; 13 | 14 | @implementation UIView (WebCacheOperation) 15 | 16 | - (NSMutableDictionary *)operationDictionary { 17 | NSMutableDictionary *operations = objc_getAssociatedObject(self, &loadOperationKey); 18 | if (operations) { 19 | return operations; 20 | } 21 | operations = [NSMutableDictionary dictionary]; 22 | objc_setAssociatedObject(self, &loadOperationKey, operations, OBJC_ASSOCIATION_RETAIN_NONATOMIC); 23 | return operations; 24 | } 25 | 26 | - (void)sd_setImageLoadOperation:(id)operation forKey:(NSString *)key { 27 | [self sd_cancelImageLoadOperationWithKey:key]; 28 | NSMutableDictionary *operationDictionary = [self operationDictionary]; 29 | [operationDictionary setObject:operation forKey:key]; 30 | } 31 | 32 | - (void)sd_cancelImageLoadOperationWithKey:(NSString *)key { 33 | // Cancel in progress downloader from queue 34 | NSMutableDictionary *operationDictionary = [self operationDictionary]; 35 | id operations = [operationDictionary objectForKey:key]; 36 | if (operations) { 37 | if ([operations isKindOfClass:[NSArray class]]) { 38 | for (id operation in operations) { 39 | if (operation) { 40 | [operation cancel]; 41 | } 42 | } 43 | } else if ([operations conformsToProtocol:@protocol(SDWebImageOperation)]){ 44 | [(id) operations cancel]; 45 | } 46 | [operationDictionary removeObjectForKey:key]; 47 | } 48 | } 49 | 50 | - (void)sd_removeImageLoadOperationWithKey:(NSString *)key { 51 | NSMutableDictionary *operationDictionary = [self operationDictionary]; 52 | [operationDictionary removeObjectForKey:key]; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/AFNetworking/AFNetworking-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "AFNetworking.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/AFNetworking" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | OTHER_LDFLAGS = ${AFNETWORKING_OTHER_LDFLAGS} 5 | PODS_ROOT = ${SRCROOT} 6 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/AFNetworking/AFNetworking-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_AFNetworking : NSObject 3 | @end 4 | @implementation PodsDummy_AFNetworking 5 | @end 6 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/AFNetworking/AFNetworking-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/AFNetworking/AFNetworking.xcconfig: -------------------------------------------------------------------------------- 1 | AFNETWORKING_OTHER_LDFLAGS = -framework "CoreGraphics" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Mantle/Mantle-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Mantle.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/Mantle" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | OTHER_LDFLAGS = ${MANTLE_OTHER_LDFLAGS} 5 | PODS_ROOT = ${SRCROOT} 6 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Mantle/Mantle-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Mantle : NSObject 3 | @end 4 | @implementation PodsDummy_Mantle 5 | @end 6 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Mantle/Mantle-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Mantle/Mantle.xcconfig: -------------------------------------------------------------------------------- 1 | MANTLE_OTHER_LDFLAGS = -framework "Foundation" -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Pods/Pods-acknowledgements.markdown: -------------------------------------------------------------------------------- 1 | # Acknowledgements 2 | This application makes use of the following third party libraries: 3 | 4 | ## AFNetworking 5 | 6 | Copyright (c) 2011–2015 Alamofire Software Foundation (http://alamofire.org/) 7 | 8 | Permission is hereby granted, free of charge, to any person obtaining a copy 9 | of this software and associated documentation files (the "Software"), to deal 10 | in the Software without restriction, including without limitation the rights 11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the Software is 13 | furnished to do so, subject to the following conditions: 14 | 15 | The above copyright notice and this permission notice shall be included in 16 | all copies or substantial portions of the Software. 17 | 18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 24 | THE SOFTWARE. 25 | 26 | 27 | ## Mantle 28 | 29 | **Copyright (c) GitHub, Inc.** 30 | **All rights reserved.** 31 | 32 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 33 | 34 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 35 | 36 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 37 | 38 | --- 39 | 40 | **This project uses portions of code from the Proton framework.** 41 | **Proton is copyright (c) 2012, Bitswift, Inc.** 42 | **All rights reserved.** 43 | 44 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 45 | 46 | * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 47 | * Neither the name of the Bitswift, Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. 48 | 49 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 50 | 51 | 52 | ## SDWebImage 53 | 54 | Copyright (c) 2009 Olivier Poitrey 55 | 56 | Permission is hereby granted, free of charge, to any person obtaining a copy 57 | of this software and associated documentation files (the "Software"), to deal 58 | in the Software without restriction, including without limitation the rights 59 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 60 | copies of the Software, and to permit persons to whom the Software is furnished 61 | to do so, subject to the following conditions: 62 | 63 | The above copyright notice and this permission notice shall be included in all 64 | copies or substantial portions of the Software. 65 | 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 67 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 68 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 69 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 70 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 71 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 72 | THE SOFTWARE. 73 | 74 | 75 | Generated by CocoaPods - http://cocoapods.org 76 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Pods/Pods-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_Pods : NSObject 3 | @end 4 | @implementation PodsDummy_Pods 5 | @end 6 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Pods/Pods-resources.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 5 | 6 | RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt 7 | > "$RESOURCES_TO_COPY" 8 | 9 | XCASSET_FILES=() 10 | 11 | realpath() { 12 | DIRECTORY="$(cd "${1%/*}" && pwd)" 13 | FILENAME="${1##*/}" 14 | echo "$DIRECTORY/$FILENAME" 15 | } 16 | 17 | install_resource() 18 | { 19 | case $1 in 20 | *.storyboard) 21 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 22 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .storyboard`.storyboardc" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 23 | ;; 24 | *.xib) 25 | echo "ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile ${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib ${PODS_ROOT}/$1 --sdk ${SDKROOT}" 26 | ibtool --reference-external-strings-file --errors --warnings --notices --output-format human-readable-text --compile "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$1\" .xib`.nib" "${PODS_ROOT}/$1" --sdk "${SDKROOT}" 27 | ;; 28 | *.framework) 29 | echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 30 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 31 | echo "rsync -av ${PODS_ROOT}/$1 ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 32 | rsync -av "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" 33 | ;; 34 | *.xcdatamodel) 35 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1"`.mom\"" 36 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodel`.mom" 37 | ;; 38 | *.xcdatamodeld) 39 | echo "xcrun momc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd\"" 40 | xcrun momc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcdatamodeld`.momd" 41 | ;; 42 | *.xcmappingmodel) 43 | echo "xcrun mapc \"${PODS_ROOT}/$1\" \"${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm\"" 44 | xcrun mapc "${PODS_ROOT}/$1" "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$1" .xcmappingmodel`.cdm" 45 | ;; 46 | *.xcassets) 47 | ABSOLUTE_XCASSET_FILE=$(realpath "${PODS_ROOT}/$1") 48 | XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") 49 | ;; 50 | /*) 51 | echo "$1" 52 | echo "$1" >> "$RESOURCES_TO_COPY" 53 | ;; 54 | *) 55 | echo "${PODS_ROOT}/$1" 56 | echo "${PODS_ROOT}/$1" >> "$RESOURCES_TO_COPY" 57 | ;; 58 | esac 59 | } 60 | 61 | mkdir -p "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 62 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 63 | if [[ "${ACTION}" == "install" ]]; then 64 | mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 65 | rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 66 | fi 67 | rm -f "$RESOURCES_TO_COPY" 68 | 69 | if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] 70 | then 71 | case "${TARGETED_DEVICE_FAMILY}" in 72 | 1,2) 73 | TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" 74 | ;; 75 | 1) 76 | TARGET_DEVICE_ARGS="--target-device iphone" 77 | ;; 78 | 2) 79 | TARGET_DEVICE_ARGS="--target-device ipad" 80 | ;; 81 | *) 82 | TARGET_DEVICE_ARGS="--target-device mac" 83 | ;; 84 | esac 85 | 86 | # Find all other xcassets (this unfortunately includes those of path pods and other targets). 87 | OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) 88 | while read line; do 89 | if [[ $line != "`realpath $PODS_ROOT`*" ]]; then 90 | XCASSET_FILES+=("$line") 91 | fi 92 | done <<<"$OTHER_XCASSETS" 93 | 94 | printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${IPHONEOS_DEPLOYMENT_TARGET}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" 95 | fi 96 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Pods/Pods.debug.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/SDWebImage" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Mantle" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"Mantle" -l"SDWebImage" -framework "CoreGraphics" -framework "Foundation" -framework "ImageIO" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/Pods/Pods.release.xcconfig: -------------------------------------------------------------------------------- 1 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 2 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/SDWebImage" 3 | OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AFNetworking" -isystem "${PODS_ROOT}/Headers/Public/Mantle" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | OTHER_LDFLAGS = $(inherited) -ObjC -l"AFNetworking" -l"Mantle" -l"SDWebImage" -framework "CoreGraphics" -framework "Foundation" -framework "ImageIO" -framework "MobileCoreServices" -framework "Security" -framework "SystemConfiguration" 5 | PODS_ROOT = ${SRCROOT}/Pods -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/SDWebImage/SDWebImage-Private.xcconfig: -------------------------------------------------------------------------------- 1 | #include "SDWebImage.xcconfig" 2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 3 | HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AFNetworking" "${PODS_ROOT}/Headers/Public/Mantle" "${PODS_ROOT}/Headers/Public/SDWebImage" 4 | OTHER_LDFLAGS = ${SDWEBIMAGE_OTHER_LDFLAGS} 5 | PODS_ROOT = ${SRCROOT} 6 | SKIP_INSTALL = YES -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/SDWebImage/SDWebImage-dummy.m: -------------------------------------------------------------------------------- 1 | #import 2 | @interface PodsDummy_SDWebImage : NSObject 3 | @end 4 | @implementation PodsDummy_SDWebImage 5 | @end 6 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/SDWebImage/SDWebImage-prefix.pch: -------------------------------------------------------------------------------- 1 | #ifdef __OBJC__ 2 | #import 3 | #endif 4 | 5 | -------------------------------------------------------------------------------- /xiachufang/Pods/Target Support Files/SDWebImage/SDWebImage.xcconfig: -------------------------------------------------------------------------------- 1 | SDWEBIMAGE_OTHER_LDFLAGS = -framework "ImageIO" -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcodeproj/project.xcworkspace/xcuserdata/denglanfeng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanfeng0706/xiachufang/423ed6eb437b370d9916eab219e59570d708a44c/xiachufang/xiachufang.xcodeproj/project.xcworkspace/xcuserdata/denglanfeng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcodeproj/xcuserdata/denglanfeng.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | xiachufang.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D2CFB5F21C05DDF5001C6BC4 16 | 17 | primary 18 | 19 | 20 | D2CFB60B1C05DDF6001C6BC4 21 | 22 | primary 23 | 24 | 25 | D2CFB6161C05DDF6001C6BC4 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcodeproj/xcuserdata/denglanfeng.xcuserdatad/xcschemes/xiachufang.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcodeproj/xcuserdata/zangqilong.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | xiachufang.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | D2CFB5F21C05DDF5001C6BC4 16 | 17 | primary 18 | 19 | 20 | D2CFB60B1C05DDF6001C6BC4 21 | 22 | primary 23 | 24 | 25 | D2CFB6161C05DDF6001C6BC4 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcodeproj/xcuserdata/zangqilong.xcuserdatad/xcschemes/xiachufang.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcworkspace/xcuserdata/denglanfeng.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanfeng0706/xiachufang/423ed6eb437b370d9916eab219e59570d708a44c/xiachufang/xiachufang.xcworkspace/xcuserdata/denglanfeng.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /xiachufang/xiachufang.xcworkspace/xcuserdata/zangqilong.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lanfeng0706/xiachufang/423ed6eb437b370d9916eab219e59570d708a44c/xiachufang/xiachufang.xcworkspace/xcuserdata/zangqilong.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /xiachufang/xiachufang/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // xiachufang 4 | // 5 | // Created by 邓岚锋 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // xiachufang 4 | // 5 | // Created by 邓岚锋 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | return YES; 21 | } 22 | 23 | - (void)applicationWillResignActive:(UIApplication *)application { 24 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 25 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 26 | } 27 | 28 | - (void)applicationDidEnterBackground:(UIApplication *)application { 29 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 30 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 31 | } 32 | 33 | - (void)applicationWillEnterForeground:(UIApplication *)application { 34 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 35 | } 36 | 37 | - (void)applicationDidBecomeActive:(UIApplication *)application { 38 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 39 | } 40 | 41 | - (void)applicationWillTerminate:(UIApplication *)application { 42 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 43 | } 44 | 45 | @end 46 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /xiachufang/xiachufang/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/FifthTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FifthTableViewCell.h 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "HomePageRecipe.h" 11 | 12 | @interface FifthTableViewCell : UITableViewCell 13 | @property (weak, nonatomic) IBOutlet UIImageView *recipeImageView; 14 | @property (weak, nonatomic) IBOutlet UILabel *recipeTitleLabel; 15 | @property (weak, nonatomic) IBOutlet UILabel *recipeSummaryLabel; 16 | @property (weak, nonatomic) IBOutlet UIImageView *userAvatarImageView; 17 | @property (weak, nonatomic) IBOutlet UILabel *countLabel; 18 | 19 | + (CGFloat)calculateCellHeightWithRecipeModel:(HomePageRecipe *)recipe; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/FifthTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FifthTableViewCell.m 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "FifthTableViewCell.h" 10 | 11 | static CGFloat const kImageViewAndTitleLabelPadding = 10.0f; 12 | static CGFloat const kTitleLabelAndSummaryLabelPadding = 10.0f; 13 | static CGFloat const kSummaryLabelAndBottomViewPadding = 10.0f; 14 | static CGFloat const kRecieImageViewHeight = 190.0f; 15 | 16 | @implementation FifthTableViewCell 17 | 18 | - (void)awakeFromNib { 19 | // Initialization code 20 | } 21 | 22 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 23 | [super setSelected:selected animated:animated]; 24 | 25 | // Configure the view for the selected state 26 | } 27 | 28 | + (CGFloat)calculateCellHeightWithRecipeModel:(HomePageRecipe *)recipe 29 | { 30 | 31 | return 0; 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/FirstRowTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FirstRowTableViewCell.h 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FirstRowTableViewCell : UITableViewCell 12 | @property (weak, nonatomic) IBOutlet UIImageView *leftImageView; 13 | @property (weak, nonatomic) IBOutlet UILabel *leftLabel; 14 | @property (weak, nonatomic) IBOutlet UIImageView *rightImageView; 15 | @property (weak, nonatomic) IBOutlet UIButton *rightButton; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/FirstRowTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FirstRowTableViewCell.m 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "FirstRowTableViewCell.h" 10 | 11 | @implementation FirstRowTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | 20 | // Configure the view for the selected state 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/FourthTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // FourthTableViewCell.h 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface FourthTableViewCell : UITableViewCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/FourthTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // FourthTableViewCell.m 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "FourthTableViewCell.h" 10 | 11 | @implementation FourthTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | 20 | // Configure the view for the selected state 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/HomePageRecipe.h: -------------------------------------------------------------------------------- 1 | // 2 | // HomePageRecipe.h 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "MTLModel.h" 10 | 11 | @interface HomePageRecipe : MTLModel 12 | 13 | @property (nonatomic, readonly, copy) NSString * title; 14 | @property (nonatomic, readonly, strong) NSURL * userPhotoURL; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/HomePageRecipe.m: -------------------------------------------------------------------------------- 1 | // 2 | // HomePageRecipe.m 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "HomePageRecipe.h" 10 | 11 | @implementation HomePageRecipe 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/HomeTableViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // HomeTableViewController.h 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface HomeTableViewController : UITableViewController 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/HomeTableViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // HomeTableViewController.m 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "HomeTableViewController.h" 10 | #import "FirstRowTableViewCell.h" 11 | #import "SecondRowTableViewCell.h" 12 | #import "FifthTableViewCell.h" 13 | 14 | static NSString * const kFirstCellID = @"kFirstCellID"; 15 | static CGFloat const kFirstCellHeight = 110.0f; 16 | 17 | static NSString * const kSecondCellID = @"kSecondCellID"; 18 | static CGFloat const kSecondCellHeight = 80.0f; 19 | 20 | static NSString * const kFifthCellID = @"kFifthCellID"; 21 | static CGFloat const kFifthCellHeight = 250.0f; 22 | 23 | @interface HomeTableViewController () 24 | { 25 | 26 | } 27 | 28 | @end 29 | 30 | @implementation HomeTableViewController 31 | 32 | - (void)viewDidLoad { 33 | [super viewDidLoad]; 34 | 35 | self.tableView.tableFooterView = [[UIView alloc] init]; 36 | 37 | } 38 | 39 | - (void)didReceiveMemoryWarning { 40 | [super didReceiveMemoryWarning]; 41 | // Dispose of any resources that can be recreated. 42 | } 43 | 44 | #pragma mark - Table view data source 45 | 46 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 47 | 48 | return 1; 49 | } 50 | 51 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 52 | 53 | return 2; 54 | } 55 | 56 | 57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 58 | if (indexPath.row == 0) { 59 | FirstRowTableViewCell *firstCell = [tableView dequeueReusableCellWithIdentifier:kFirstCellID]; 60 | return firstCell; 61 | }else{ 62 | SecondRowTableViewCell *secondCell = [tableView dequeueReusableCellWithIdentifier:kSecondCellID]; 63 | return secondCell; 64 | } 65 | 66 | } 67 | 68 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 69 | if (indexPath.row == 0) { 70 | return kFirstCellHeight; 71 | }else 72 | { 73 | return kSecondCellHeight; 74 | } 75 | 76 | } 77 | 78 | 79 | /* 80 | // Override to support conditional editing of the table view. 81 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { 82 | // Return NO if you do not want the specified item to be editable. 83 | return YES; 84 | } 85 | */ 86 | 87 | /* 88 | // Override to support editing the table view. 89 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath { 90 | if (editingStyle == UITableViewCellEditingStyleDelete) { 91 | // Delete the row from the data source 92 | [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationFade]; 93 | } else if (editingStyle == UITableViewCellEditingStyleInsert) { 94 | // Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view 95 | } 96 | } 97 | */ 98 | 99 | /* 100 | // Override to support rearranging the table view. 101 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath { 102 | } 103 | */ 104 | 105 | /* 106 | // Override to support conditional rearranging of the table view. 107 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath { 108 | // Return NO if you do not want the item to be re-orderable. 109 | return YES; 110 | } 111 | */ 112 | 113 | /* 114 | #pragma mark - Navigation 115 | 116 | // In a storyboard-based application, you will often want to do a little preparation before navigation 117 | - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { 118 | // Get the new view controller using [segue destinationViewController]. 119 | // Pass the selected object to the new view controller. 120 | } 121 | */ 122 | 123 | @end 124 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/SecondRowTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // SecondRowTableViewCell.h 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SecondRowTableViewCell : UITableViewCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/SecondRowTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // SecondRowTableViewCell.m 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "SecondRowTableViewCell.h" 10 | 11 | @implementation SecondRowTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | 20 | // Configure the view for the selected state 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/ThirdTableViewCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdTableViewCell.h 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ThirdTableViewCell : UITableViewCell 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/ThirdTableViewCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // ThirdTableViewCell.m 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "ThirdTableViewCell.h" 10 | 11 | @implementation ThirdTableViewCell 12 | 13 | - (void)awakeFromNib { 14 | // Initialization code 15 | } 16 | 17 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 18 | [super setSelected:selected animated:animated]; 19 | 20 | // Configure the view for the selected state 21 | } 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/UIColor+themeColor.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+themeColor.h 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIColor (themeColor) 12 | 13 | + (UIColor *)priceLabelColor; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/UIColor+themeColor.m: -------------------------------------------------------------------------------- 1 | // 2 | // UIColor+themeColor.m 3 | // xiachufang 4 | // 5 | // Created by 臧其龙 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import "UIColor+themeColor.h" 10 | 11 | @implementation UIColor (themeColor) 12 | 13 | 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /xiachufang/xiachufang/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // xiachufang 4 | // 5 | // Created by 邓岚锋 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /xiachufang/xiachufangTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /xiachufang/xiachufangTests/xiachufangTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // xiachufangTests.m 3 | // xiachufangTests 4 | // 5 | // Created by 邓岚锋 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface xiachufangTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation xiachufangTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /xiachufang/xiachufangUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /xiachufang/xiachufangUITests/xiachufangUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // xiachufangUITests.m 3 | // xiachufangUITests 4 | // 5 | // Created by 邓岚锋 on 15/11/25. 6 | // Copyright © 2015年 邓岚锋. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface xiachufangUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation xiachufangUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------