appjam 0.1.8.8 → 0.1.8.9
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +22 -62
- data/lib/appjam/generators/gist.yml +1 -1
- data/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.pbxproj +1166 -482
- data/lib/appjam/generators/templates/blank/EiffelApplication.xcodeproj/project.xcworkspace/xcuserdata/eiffel.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/EiffelApplication-Prefix.pch.tt +26 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenu.h +52 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenu.m +412 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenuItem.h +44 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/AwesomeMenuItem.m +97 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton-highlighted@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-addbutton@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem-highlighted@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/bg-menuitem@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus-highlighted@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-plus@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/AwesomeMenu/Images/icon-star@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/CMPopTipView/CMPopTipView.h +167 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/CMPopTipView/CMPopTipView.m +639 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/FXLabel/FXLabel.h +97 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/FXLabel/FXLabel.m +1080 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MBProgressHUD/MBProgressHUD.h +451 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/MBProgressHUD/MBProgressHUD.m +865 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FacingView.h +42 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FacingView.m +56 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FoldView.h +90 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/FoldView.m +316 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/MultiFoldView.h +104 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/MultiFoldView.m +516 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldConstants.h +49 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldNavigationController.h +18 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldNavigationController.m +88 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_left@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldResources.bundle/swipe_guide_right@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldSwipeHintView.h +25 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldSwipeHintView.m +76 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldView.h +131 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/PaperFoldView.m +941 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide.psd +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/Resources/swipe_guide2.psd +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/ShadowView.h +46 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/ShadowView.m +82 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/TouchThroughUIView.h +39 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/TouchThroughUIView.m +72 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/UIView+Screenshot.h +42 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/PaperFold/UIView+Screenshot.m +100 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/NSBubbleData.h +34 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/NSBubbleData.m +140 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleHeaderTableViewCell.h +17 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleHeaderTableViewCell.m +57 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableView.h +30 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableView.m +233 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewCell.h +19 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewCell.m +122 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTableViewDataSource.h +24 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTypingTableViewCell.h +20 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/UIBubbleTypingTableViewCell.m +56 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleMine@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/bubbleSomeone@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/missingAvatar@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingMine@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIBubbleTableView/images/typingSomeone@2x.png +0 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIGlossyButton.h +124 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIGlossyButton.m +545 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIView+LayerEffects.h +22 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/components/UIGlossyButton/UIView+LayerEffects.m +32 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFIncrementalStore.h +344 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFIncrementalStore.m +848 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFRESTClient.h +135 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/AFIncrementalStore/AFRESTClient.m +441 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/NSString+InflectorKit.h +40 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/NSString+InflectorKit.m +36 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/TTTStringInflector.h +76 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/InflectorKit/TTTStringInflector.m +270 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/MKAnnotationView+WebCache.h +95 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/MKAnnotationView+WebCache.m +78 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDImageCache.h +144 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDImageCache.m +311 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageCompat.h +40 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageCompat.m +54 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDecoder.h +18 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDecoder.m +70 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloader.h +102 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloader.m +226 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloaderOperation.h +25 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageDownloaderOperation.m +339 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageManager.h +167 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageManager.m +244 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImageOperation.h +15 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImagePrefetcher.h +58 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/SDWebImagePrefetcher.m +127 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIButton+WebCache.h +173 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIButton+WebCache.m +129 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIImageView+WebCache.h +140 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/frameworks/SDWebImage/UIImageView+WebCache.m +84 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationProgram.h +28 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationSequence.h +28 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/CPAnimationStep.h +49 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationProgram.m +100 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationSequence.m +85 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CPAnimationSequence/private/CPAnimationStep.m +122 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaAsyncSocket/GCDAsyncSocket.h +1074 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaAsyncSocket/GCDAsyncSocket.m +7430 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDData.h +14 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDData.m +158 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDNumber.h +12 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDNumber.m +88 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDRange.h +56 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Categories/DDRange.m +104 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPAuthenticationRequest.h +45 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPAuthenticationRequest.m +195 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPConnection.h +119 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPConnection.m +2708 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPLogging.h +136 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPMessage.h +48 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPMessage.m +113 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPResponse.h +149 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPServer.h +205 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/HTTPServer.m +772 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.h +65 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartFormDataParser.m +529 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.h +33 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeader.m +86 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.h +23 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Mime/MultipartMessageHeaderField.m +211 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.h +75 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPAsyncFileResponse.m +405 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDataResponse.h +13 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDataResponse.m +79 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.h +52 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPDynamicFileResponse.m +292 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.h +9 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPErrorResponse.m +38 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPFileResponse.h +25 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPFileResponse.m +237 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.h +12 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/Responses/HTTPRedirectResponse.m +73 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/WebSocket.h +105 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Core/WebSocket.m +791 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.h +7 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVConnection.m +160 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.h +11 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DAVResponse.m +372 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.h +7 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/DELETEResponse.m +49 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.h +8 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/CocoaHTTPServer/Extensions/WebDAV/PUTResponse.m +69 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHpple.h +54 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHpple.m +102 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHppleElement.h +103 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/TFHppleElement.m +200 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/XPathQuery.h +10 -0
- data/lib/appjam/generators/templates/blank/EiffelApplication/libs/toolkit/hpple/XPathQuery.m +197 -0
- data/lib/appjam/version.rb +1 -1
- metadata +164 -3
@@ -0,0 +1,244 @@
|
|
1
|
+
/*
|
2
|
+
* This file is part of the SDWebImage package.
|
3
|
+
* (c) Olivier Poitrey <rs@dailymotion.com>
|
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 "SDWebImageManager.h"
|
10
|
+
#import <objc/message.h>
|
11
|
+
|
12
|
+
@interface SDWebImageCombinedOperation : NSObject <SDWebImageOperation>
|
13
|
+
|
14
|
+
@property (assign, nonatomic, getter = isCancelled) BOOL cancelled;
|
15
|
+
@property (copy, nonatomic) void (^cancelBlock)();
|
16
|
+
|
17
|
+
@end
|
18
|
+
|
19
|
+
@interface SDWebImageManager ()
|
20
|
+
|
21
|
+
@property (strong, nonatomic, readwrite) SDImageCache *imageCache;
|
22
|
+
@property (strong, nonatomic, readwrite) SDWebImageDownloader *imageDownloader;
|
23
|
+
@property (strong, nonatomic) NSMutableArray *failedURLs;
|
24
|
+
@property (strong, nonatomic) NSMutableArray *runningOperations;
|
25
|
+
|
26
|
+
@end
|
27
|
+
|
28
|
+
@implementation SDWebImageManager
|
29
|
+
|
30
|
+
+ (id)sharedManager
|
31
|
+
{
|
32
|
+
static dispatch_once_t once;
|
33
|
+
static id instance;
|
34
|
+
dispatch_once(&once, ^{instance = self.new;});
|
35
|
+
return instance;
|
36
|
+
}
|
37
|
+
|
38
|
+
- (id)init
|
39
|
+
{
|
40
|
+
if ((self = [super init]))
|
41
|
+
{
|
42
|
+
_imageCache = [SDImageCache sharedImageCache];
|
43
|
+
_imageDownloader = SDWebImageDownloader.new;
|
44
|
+
_failedURLs = NSMutableArray.new;
|
45
|
+
_runningOperations = NSMutableArray.new;
|
46
|
+
}
|
47
|
+
return self;
|
48
|
+
}
|
49
|
+
|
50
|
+
|
51
|
+
- (NSString *)cacheKeyForURL:(NSURL *)url
|
52
|
+
{
|
53
|
+
if (self.cacheKeyFilter)
|
54
|
+
{
|
55
|
+
return self.cacheKeyFilter(url);
|
56
|
+
}
|
57
|
+
else
|
58
|
+
{
|
59
|
+
return [url absoluteString];
|
60
|
+
}
|
61
|
+
}
|
62
|
+
|
63
|
+
- (id<SDWebImageOperation>)downloadWithURL:(NSURL *)url options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletedWithFinishedBlock)completedBlock
|
64
|
+
{
|
65
|
+
// Very common mistake is to send the URL using NSString object instead of NSURL. For some strange reason, XCode won't
|
66
|
+
// throw any warning for this type mismatch. Here we failsafe this error by allowing URLs to be passed as NSString.
|
67
|
+
if ([url isKindOfClass:NSString.class])
|
68
|
+
{
|
69
|
+
url = [NSURL URLWithString:(NSString *)url];
|
70
|
+
}
|
71
|
+
|
72
|
+
// Prevents app crashing on argument type error like sending NSNull instead of NSURL
|
73
|
+
if (![url isKindOfClass:NSURL.class])
|
74
|
+
{
|
75
|
+
url = nil;
|
76
|
+
}
|
77
|
+
|
78
|
+
__block SDWebImageCombinedOperation *operation = SDWebImageCombinedOperation.new;
|
79
|
+
__weak SDWebImageCombinedOperation *weakOperation = operation;
|
80
|
+
|
81
|
+
if (!url || !completedBlock || (!(options & SDWebImageRetryFailed) && [self.failedURLs containsObject:url]))
|
82
|
+
{
|
83
|
+
if (completedBlock) completedBlock(nil, nil, SDImageCacheTypeNone, NO);
|
84
|
+
return operation;
|
85
|
+
}
|
86
|
+
|
87
|
+
@synchronized(self.runningOperations)
|
88
|
+
{
|
89
|
+
[self.runningOperations addObject:operation];
|
90
|
+
}
|
91
|
+
NSString *key = [self cacheKeyForURL:url];
|
92
|
+
|
93
|
+
[self.imageCache queryDiskCacheForKey:key done:^(UIImage *image, SDImageCacheType cacheType)
|
94
|
+
{
|
95
|
+
if (operation.isCancelled) return;
|
96
|
+
|
97
|
+
if ((!image || options & SDWebImageRefreshCached) && (![self.delegate respondsToSelector:@selector(imageManager:shouldDownloadImageForURL:)] || [self.delegate imageManager:self shouldDownloadImageForURL:url]))
|
98
|
+
{
|
99
|
+
if (image && options & SDWebImageRefreshCached)
|
100
|
+
{
|
101
|
+
// If image was found in the cache bug SDWebImageRefreshCached is provided, notify about the cached image
|
102
|
+
// AND try to re-download it in order to let a chance to NSURLCache to refresh it from server.
|
103
|
+
completedBlock(image, nil, cacheType, YES);
|
104
|
+
}
|
105
|
+
|
106
|
+
// download if no image or requested to refresh anyway, and download allowed by delegate
|
107
|
+
SDWebImageDownloaderOptions downloaderOptions = 0;
|
108
|
+
if (options & SDWebImageLowPriority) downloaderOptions |= SDWebImageDownloaderLowPriority;
|
109
|
+
if (options & SDWebImageProgressiveDownload) downloaderOptions |= SDWebImageDownloaderProgressiveDownload;
|
110
|
+
if (options & SDWebImageRefreshCached) downloaderOptions |= SDWebImageDownloaderUseNSURLCache;
|
111
|
+
if (image && options & SDWebImageRefreshCached)
|
112
|
+
{
|
113
|
+
// force progressive off if image already cached but forced refreshing
|
114
|
+
downloaderOptions &= ~SDWebImageDownloaderProgressiveDownload;
|
115
|
+
// ignore image read from NSURLCache if image if cached but force refreshing
|
116
|
+
downloaderOptions |= SDWebImageDownloaderIgnoreCachedResponse;
|
117
|
+
}
|
118
|
+
__block id<SDWebImageOperation> subOperation = [self.imageDownloader downloadImageWithURL:url options:downloaderOptions progress:progressBlock completed:^(UIImage *downloadedImage, NSData *data, NSError *error, BOOL finished)
|
119
|
+
{
|
120
|
+
if (weakOperation.cancelled)
|
121
|
+
{
|
122
|
+
completedBlock(nil, nil, SDImageCacheTypeNone, finished);
|
123
|
+
}
|
124
|
+
else if (error)
|
125
|
+
{
|
126
|
+
completedBlock(nil, error, SDImageCacheTypeNone, finished);
|
127
|
+
|
128
|
+
if (error.code != NSURLErrorNotConnectedToInternet)
|
129
|
+
{
|
130
|
+
@synchronized(self.failedURLs)
|
131
|
+
{
|
132
|
+
[self.failedURLs addObject:url];
|
133
|
+
}
|
134
|
+
}
|
135
|
+
}
|
136
|
+
else
|
137
|
+
{
|
138
|
+
BOOL cacheOnDisk = !(options & SDWebImageCacheMemoryOnly);
|
139
|
+
|
140
|
+
if (options & SDWebImageRefreshCached && image && !downloadedImage)
|
141
|
+
{
|
142
|
+
// Image refresh hit the NSURLCache cache, do not call the completion block
|
143
|
+
}
|
144
|
+
else if (downloadedImage && [self.delegate respondsToSelector:@selector(imageManager:transformDownloadedImage:withURL:)])
|
145
|
+
{
|
146
|
+
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^
|
147
|
+
{
|
148
|
+
UIImage *transformedImage = [self.delegate imageManager:self transformDownloadedImage:downloadedImage withURL:url];
|
149
|
+
|
150
|
+
dispatch_async(dispatch_get_main_queue(), ^
|
151
|
+
{
|
152
|
+
completedBlock(transformedImage, nil, SDImageCacheTypeNone, finished);
|
153
|
+
});
|
154
|
+
|
155
|
+
if (transformedImage && finished)
|
156
|
+
{
|
157
|
+
[self.imageCache storeImage:transformedImage imageData:nil forKey:key toDisk:cacheOnDisk];
|
158
|
+
}
|
159
|
+
});
|
160
|
+
}
|
161
|
+
else
|
162
|
+
{
|
163
|
+
completedBlock(downloadedImage, nil, SDImageCacheTypeNone, finished);
|
164
|
+
|
165
|
+
if (downloadedImage && finished)
|
166
|
+
{
|
167
|
+
[self.imageCache storeImage:downloadedImage imageData:data forKey:key toDisk:cacheOnDisk];
|
168
|
+
}
|
169
|
+
}
|
170
|
+
}
|
171
|
+
|
172
|
+
if (finished)
|
173
|
+
{
|
174
|
+
@synchronized(self.runningOperations)
|
175
|
+
{
|
176
|
+
[self.runningOperations removeObject:operation];
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}];
|
180
|
+
operation.cancelBlock = ^{[subOperation cancel];};
|
181
|
+
}
|
182
|
+
else if (image)
|
183
|
+
{
|
184
|
+
completedBlock(image, nil, cacheType, YES);
|
185
|
+
@synchronized(self.runningOperations)
|
186
|
+
{
|
187
|
+
[self.runningOperations removeObject:operation];
|
188
|
+
}
|
189
|
+
}
|
190
|
+
else
|
191
|
+
{
|
192
|
+
// Image not in cache and download disallowed by delegate
|
193
|
+
completedBlock(nil, nil, SDImageCacheTypeNone, YES);
|
194
|
+
@synchronized(self.runningOperations)
|
195
|
+
{
|
196
|
+
[self.runningOperations removeObject:operation];
|
197
|
+
}
|
198
|
+
}
|
199
|
+
}];
|
200
|
+
|
201
|
+
return operation;
|
202
|
+
}
|
203
|
+
|
204
|
+
- (void)cancelAll
|
205
|
+
{
|
206
|
+
@synchronized(self.runningOperations)
|
207
|
+
{
|
208
|
+
[self.runningOperations makeObjectsPerformSelector:@selector(cancel)];
|
209
|
+
[self.runningOperations removeAllObjects];
|
210
|
+
}
|
211
|
+
}
|
212
|
+
|
213
|
+
- (BOOL)isRunning
|
214
|
+
{
|
215
|
+
return self.runningOperations.count > 0;
|
216
|
+
}
|
217
|
+
|
218
|
+
@end
|
219
|
+
|
220
|
+
@implementation SDWebImageCombinedOperation
|
221
|
+
|
222
|
+
- (void)setCancelBlock:(void (^)())cancelBlock
|
223
|
+
{
|
224
|
+
if (self.isCancelled)
|
225
|
+
{
|
226
|
+
if (cancelBlock) cancelBlock();
|
227
|
+
}
|
228
|
+
else
|
229
|
+
{
|
230
|
+
_cancelBlock = [cancelBlock copy];
|
231
|
+
}
|
232
|
+
}
|
233
|
+
|
234
|
+
- (void)cancel
|
235
|
+
{
|
236
|
+
self.cancelled = YES;
|
237
|
+
if (self.cancelBlock)
|
238
|
+
{
|
239
|
+
self.cancelBlock();
|
240
|
+
self.cancelBlock = nil;
|
241
|
+
}
|
242
|
+
}
|
243
|
+
|
244
|
+
@end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/*
|
2
|
+
* This file is part of the SDWebImage package.
|
3
|
+
* (c) Olivier Poitrey <rs@dailymotion.com>
|
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 <Foundation/Foundation.h>
|
10
|
+
|
11
|
+
@protocol SDWebImageOperation <NSObject>
|
12
|
+
|
13
|
+
- (void)cancel;
|
14
|
+
|
15
|
+
@end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
/*
|
2
|
+
* This file is part of the SDWebImage package.
|
3
|
+
* (c) Olivier Poitrey <rs@dailymotion.com>
|
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 <Foundation/Foundation.h>
|
10
|
+
#import "SDWebImageManager.h"
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Prefetch some URLs in the cache for future use. Images are downloaded in low priority.
|
14
|
+
*/
|
15
|
+
@interface SDWebImagePrefetcher : NSObject
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Maximum number of URLs to prefetch at the same time. Defaults to 3.
|
19
|
+
*/
|
20
|
+
@property (nonatomic, assign) NSUInteger maxConcurrentDownloads;
|
21
|
+
|
22
|
+
/**
|
23
|
+
* SDWebImageOptions for prefetcher. Defaults to SDWebImageLowPriority.
|
24
|
+
*/
|
25
|
+
@property (nonatomic, assign) SDWebImageOptions options;
|
26
|
+
|
27
|
+
|
28
|
+
/**
|
29
|
+
* Return the global image prefetcher instance.
|
30
|
+
*/
|
31
|
+
+ (SDWebImagePrefetcher *)sharedImagePrefetcher;
|
32
|
+
|
33
|
+
/**
|
34
|
+
* Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
|
35
|
+
* currently one image is downloaded at a time,
|
36
|
+
* and skips images for failed downloads and proceed to the next image in the list
|
37
|
+
*
|
38
|
+
* @param urls list of URLs to prefetch
|
39
|
+
*/
|
40
|
+
- (void)prefetchURLs:(NSArray *)urls;
|
41
|
+
|
42
|
+
/**
|
43
|
+
* Assign list of URLs to let SDWebImagePrefetcher to queue the prefetching,
|
44
|
+
* currently one image is downloaded at a time,
|
45
|
+
* and skips images for failed downloads and proceed to the next image in the list
|
46
|
+
*
|
47
|
+
* @param urls list of URLs to prefetch
|
48
|
+
* @param completionBlock block to be called when prefetching is completed
|
49
|
+
*/
|
50
|
+
- (void)prefetchURLs:(NSArray *)urls completed:(void (^)(NSUInteger finishedCount, NSUInteger skippedCount))completionBlock;
|
51
|
+
|
52
|
+
/**
|
53
|
+
* Remove and cancel queued list
|
54
|
+
*/
|
55
|
+
- (void)cancelPrefetching;
|
56
|
+
|
57
|
+
|
58
|
+
@end
|
@@ -0,0 +1,127 @@
|
|
1
|
+
/*
|
2
|
+
* This file is part of the SDWebImage package.
|
3
|
+
* (c) Olivier Poitrey <rs@dailymotion.com>
|
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 "SDWebImagePrefetcher.h"
|
10
|
+
#import "SDWebImageManager.h"
|
11
|
+
|
12
|
+
@interface SDWebImagePrefetcher ()
|
13
|
+
|
14
|
+
@property (strong, nonatomic) SDWebImageManager *manager;
|
15
|
+
@property (strong, nonatomic) NSArray *prefetchURLs;
|
16
|
+
@property (assign, nonatomic) NSUInteger requestedCount;
|
17
|
+
@property (assign, nonatomic) NSUInteger skippedCount;
|
18
|
+
@property (assign, nonatomic) NSUInteger finishedCount;
|
19
|
+
@property (assign, nonatomic) NSTimeInterval startedTime;
|
20
|
+
@property (SDDispatchQueueSetterSementics, nonatomic) void (^completionBlock)(NSUInteger, NSUInteger);
|
21
|
+
|
22
|
+
@end
|
23
|
+
|
24
|
+
@implementation SDWebImagePrefetcher
|
25
|
+
|
26
|
+
+ (SDWebImagePrefetcher *)sharedImagePrefetcher
|
27
|
+
{
|
28
|
+
static dispatch_once_t once;
|
29
|
+
static id instance;
|
30
|
+
dispatch_once(&once, ^{instance = self.new;});
|
31
|
+
return instance;
|
32
|
+
}
|
33
|
+
|
34
|
+
- (id)init
|
35
|
+
{
|
36
|
+
if ((self = [super init]))
|
37
|
+
{
|
38
|
+
_manager = SDWebImageManager.new;
|
39
|
+
_options = SDWebImageLowPriority;
|
40
|
+
self.maxConcurrentDownloads = 3;
|
41
|
+
}
|
42
|
+
return self;
|
43
|
+
}
|
44
|
+
|
45
|
+
- (void)setMaxConcurrentDownloads:(NSUInteger)maxConcurrentDownloads
|
46
|
+
{
|
47
|
+
self.manager.imageDownloader.maxConcurrentDownloads = maxConcurrentDownloads;
|
48
|
+
}
|
49
|
+
|
50
|
+
- (NSUInteger)maxConcurrentDownloads
|
51
|
+
{
|
52
|
+
return self.manager.imageDownloader.maxConcurrentDownloads;
|
53
|
+
}
|
54
|
+
|
55
|
+
- (void)startPrefetchingAtIndex:(NSUInteger)index
|
56
|
+
{
|
57
|
+
if (index >= self.prefetchURLs.count) return;
|
58
|
+
self.requestedCount++;
|
59
|
+
[self.manager downloadWithURL:self.prefetchURLs[index] options:self.options progress:nil completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, BOOL finished)
|
60
|
+
{
|
61
|
+
if (!finished) return;
|
62
|
+
self.finishedCount++;
|
63
|
+
|
64
|
+
if (image)
|
65
|
+
{
|
66
|
+
NSLog(@"Prefetched %d out of %d", self.finishedCount, self.prefetchURLs.count);
|
67
|
+
}
|
68
|
+
else
|
69
|
+
{
|
70
|
+
NSLog(@"Prefetched %d out of %d (Failed)", self.finishedCount, [self.prefetchURLs count]);
|
71
|
+
|
72
|
+
// Add last failed
|
73
|
+
self.skippedCount++;
|
74
|
+
}
|
75
|
+
|
76
|
+
if (self.prefetchURLs.count > self.requestedCount)
|
77
|
+
{
|
78
|
+
[self startPrefetchingAtIndex:self.requestedCount];
|
79
|
+
}
|
80
|
+
else if (self.finishedCount == self.requestedCount)
|
81
|
+
{
|
82
|
+
[self reportStatus];
|
83
|
+
if (self.completionBlock)
|
84
|
+
{
|
85
|
+
self.completionBlock(self.finishedCount, self.skippedCount);
|
86
|
+
self.completionBlock = nil;
|
87
|
+
}
|
88
|
+
}
|
89
|
+
}];
|
90
|
+
}
|
91
|
+
|
92
|
+
- (void)reportStatus
|
93
|
+
{
|
94
|
+
NSUInteger total = [self.prefetchURLs count];
|
95
|
+
NSLog(@"Finished prefetching (%d successful, %d skipped, timeElasped %.2f)", total - self.skippedCount, self.skippedCount, CFAbsoluteTimeGetCurrent() - self.startedTime);
|
96
|
+
}
|
97
|
+
|
98
|
+
- (void)prefetchURLs:(NSArray *)urls
|
99
|
+
{
|
100
|
+
[self prefetchURLs:urls completed:nil];
|
101
|
+
}
|
102
|
+
|
103
|
+
- (void)prefetchURLs:(NSArray *)urls completed:(void (^)(NSUInteger, NSUInteger))completionBlock
|
104
|
+
{
|
105
|
+
[self cancelPrefetching]; // Prevent duplicate prefetch request
|
106
|
+
self.startedTime = CFAbsoluteTimeGetCurrent();
|
107
|
+
self.prefetchURLs = urls;
|
108
|
+
self.completionBlock = completionBlock;
|
109
|
+
|
110
|
+
// Starts prefetching from the very first image on the list with the max allowed concurrency
|
111
|
+
NSUInteger listCount = self.prefetchURLs.count;
|
112
|
+
for (NSUInteger i = 0; i < self.maxConcurrentDownloads && self.requestedCount < listCount; i++)
|
113
|
+
{
|
114
|
+
[self startPrefetchingAtIndex:i];
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
- (void)cancelPrefetching
|
119
|
+
{
|
120
|
+
self.prefetchURLs = nil;
|
121
|
+
self.skippedCount = 0;
|
122
|
+
self.requestedCount = 0;
|
123
|
+
self.finishedCount = 0;
|
124
|
+
[self.manager cancelAll];
|
125
|
+
}
|
126
|
+
|
127
|
+
@end
|
@@ -0,0 +1,173 @@
|
|
1
|
+
/*
|
2
|
+
* This file is part of the SDWebImage package.
|
3
|
+
* (c) Olivier Poitrey <rs@dailymotion.com>
|
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 "SDWebImageCompat.h"
|
10
|
+
#import "SDWebImageManager.h"
|
11
|
+
|
12
|
+
/**
|
13
|
+
* Integrates SDWebImage async downloading and caching of remote images with UIButtonView.
|
14
|
+
*/
|
15
|
+
@interface UIButton (WebCache)
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Set the imageView `image` with an `url`.
|
19
|
+
*
|
20
|
+
* The downloand is asynchronous and cached.
|
21
|
+
*
|
22
|
+
* @param url The url for the image.
|
23
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
24
|
+
*/
|
25
|
+
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state;
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Set the imageView `image` with an `url` and a placeholder.
|
29
|
+
*
|
30
|
+
* The downloand is asynchronous and cached.
|
31
|
+
*
|
32
|
+
* @param url The url for the image.
|
33
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
34
|
+
* @param placeholder The image to be set initially, until the image request finishes.
|
35
|
+
* @see setImageWithURL:placeholderImage:options:
|
36
|
+
*/
|
37
|
+
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder;
|
38
|
+
|
39
|
+
/**
|
40
|
+
* Set the imageView `image` with an `url`, placeholder and custom options.
|
41
|
+
*
|
42
|
+
* The downloand is asynchronous and cached.
|
43
|
+
*
|
44
|
+
* @param url The url for the image.
|
45
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
46
|
+
* @param placeholder The image to be set initially, until the image request finishes.
|
47
|
+
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
|
48
|
+
*/
|
49
|
+
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options;
|
50
|
+
|
51
|
+
/**
|
52
|
+
* Set the imageView `image` with an `url`.
|
53
|
+
*
|
54
|
+
* The downloand is asynchronous and cached.
|
55
|
+
*
|
56
|
+
* @param url The url for the image.
|
57
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
58
|
+
* @param completedBlock A block called when operation has been completed. This block as no return value
|
59
|
+
* and takes the requested UIImage as first parameter. In case of error the image parameter
|
60
|
+
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
|
61
|
+
* indicating if the image was retrived from the local cache of from the network.
|
62
|
+
*/
|
63
|
+
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock;
|
64
|
+
|
65
|
+
/**
|
66
|
+
* Set the imageView `image` with an `url`, placeholder.
|
67
|
+
*
|
68
|
+
* The downloand is asynchronous and cached.
|
69
|
+
*
|
70
|
+
* @param url The url for the image.
|
71
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
72
|
+
* @param placeholder The image to be set initially, until the image request finishes.
|
73
|
+
* @param completedBlock A block called when operation has been completed. This block as no return value
|
74
|
+
* and takes the requested UIImage as first parameter. In case of error the image parameter
|
75
|
+
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
|
76
|
+
* indicating if the image was retrived from the local cache of from the network.
|
77
|
+
*/
|
78
|
+
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock;
|
79
|
+
|
80
|
+
/**
|
81
|
+
* Set the imageView `image` with an `url`, placeholder and custom options.
|
82
|
+
*
|
83
|
+
* The downloand is asynchronous and cached.
|
84
|
+
*
|
85
|
+
* @param url The url for the image.
|
86
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
87
|
+
* @param placeholder The image to be set initially, until the image request finishes.
|
88
|
+
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
|
89
|
+
* @param completedBlock A block called when operation has been completed. This block as no return value
|
90
|
+
* and takes the requested UIImage as first parameter. In case of error the image parameter
|
91
|
+
* is nil and the second parameter may contain an NSError. The third parameter is a Boolean
|
92
|
+
* indicating if the image was retrived from the local cache of from the network.
|
93
|
+
*/
|
94
|
+
- (void)setImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock;
|
95
|
+
|
96
|
+
/**
|
97
|
+
* Set the backgroundImageView `image` with an `url`.
|
98
|
+
*
|
99
|
+
* The downloand is asynchronous and cached.
|
100
|
+
*
|
101
|
+
* @param url The url for the image.
|
102
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
103
|
+
*/
|
104
|
+
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state;
|
105
|
+
|
106
|
+
/**
|
107
|
+
* Set the backgroundImageView `image` with an `url` and a placeholder.
|
108
|
+
*
|
109
|
+
* The downloand is asynchronous and cached.
|
110
|
+
*
|
111
|
+
* @param url The url for the image.
|
112
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
113
|
+
* @param placeholder The image to be set initially, until the image request finishes.
|
114
|
+
* @see setImageWithURL:placeholderImage:options:
|
115
|
+
*/
|
116
|
+
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder;
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Set the backgroundImageView `image` with an `url`, placeholder and custom options.
|
120
|
+
*
|
121
|
+
* The downloand is asynchronous and cached.
|
122
|
+
*
|
123
|
+
* @param url The url for the image.
|
124
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
125
|
+
* @param placeholder The image to be set initially, until the image request finishes.
|
126
|
+
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
|
127
|
+
*/
|
128
|
+
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options;
|
129
|
+
|
130
|
+
/**
|
131
|
+
* Set the backgroundImageView `image` with an `url`.
|
132
|
+
*
|
133
|
+
* The downloand is asynchronous and cached.
|
134
|
+
*
|
135
|
+
* @param url The url for the image.
|
136
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
137
|
+
* @param success A block to be executed when the image request succeed This block has no return value and takes the retrieved image as argument.
|
138
|
+
* @param failure A block object to be executed when the image request failed. This block has no return value and takes the error object describing the network or parsing error that occurred (may be nil).
|
139
|
+
*/
|
140
|
+
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state completed:(SDWebImageCompletedBlock)completedBlock;
|
141
|
+
|
142
|
+
/**
|
143
|
+
* Set the backgroundImageView `image` with an `url`, placeholder.
|
144
|
+
*
|
145
|
+
* The downloand is asynchronous and cached.
|
146
|
+
*
|
147
|
+
* @param url The url for the image.
|
148
|
+
* @param state The state that uses the specified title. The values are described in UIControlState.
|
149
|
+
* @param placeholder The image to be set initially, until the image request finishes.
|
150
|
+
* @param success A block to be executed when the image request succeed This block has no return value and takes the retrieved image as argument.
|
151
|
+
* @param failure A block object to be executed when the image request failed. This block has no return value and takes the error object describing the network or parsing error that occurred (may be nil).
|
152
|
+
*/
|
153
|
+
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder completed:(SDWebImageCompletedBlock)completedBlock;
|
154
|
+
|
155
|
+
/**
|
156
|
+
* Set the backgroundImageView `image` with an `url`, placeholder and custom options.
|
157
|
+
*
|
158
|
+
* The downloand is asynchronous and cached.
|
159
|
+
*
|
160
|
+
* @param url The url for the image.
|
161
|
+
* @param placeholder The image to be set initially, until the image request finishes.
|
162
|
+
* @param options The options to use when downloading the image. @see SDWebImageOptions for the possible values.
|
163
|
+
* @param success A block to be executed when the image request succeed This block has no return value and takes the retrieved image as argument.
|
164
|
+
* @param failure A block object to be executed when the image request failed. This block has no return value and takes the error object describing the network or parsing error that occurred (may be nil).
|
165
|
+
*/
|
166
|
+
- (void)setBackgroundImageWithURL:(NSURL *)url forState:(UIControlState)state placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options completed:(SDWebImageCompletedBlock)completedBlock;
|
167
|
+
|
168
|
+
/**
|
169
|
+
* Cancel the current download
|
170
|
+
*/
|
171
|
+
- (void)cancelCurrentImageLoad;
|
172
|
+
|
173
|
+
@end
|