Skip to content

Commit 94709aa

Browse files
committed
chore(ios): update SDWwebImage to version 5.8.0
1 parent e2c5024 commit 94709aa

46 files changed

Lines changed: 515 additions & 51 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ ios/dist
44
ios/build
55
ios/Carthage
66
ios/Cartfile.resolved
7+
ios/run.command
78
ios/imageview-ios.xcodeproj/project.xcworkspace/xcuserdata/*.xcuserdatad
89
ios/imageview-ios.xcodeproj/project.xcworkspace/xcuserdata
910
ios/imageview-ios.xcodeproj/xcuserdata

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ All [Titanium.UI.View](http://docs.appcelerator.com/platform/latest/#!/api/Titan
9393
| brokenLinkImage | Image to display when the image fetch goes in error ||| Must refers to a __local__ image |
9494
| loadingIndicator | Enable or disable the activity indicator when the download is in progress ||| `true` by default |
9595
| loadingIndicatorColor | Changes the loading indicator color ||| |
96-
| requestHeader | An object used to define extra http request header fields ||| |
96+
| requestHeaders | An object used to define extra http request header fields ||| |
9797
| timeout | Sets timeout for requests, in milliseconds ||| |
9898
| handleCookies | Enables cookie handling for remote images ||| |
9999
| shouldCacheImagesInMemory | Activates in-memory cache mechanism ||| `true` by default |

ios/Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github "SDWebImage/SDWebImage" ~> 5.4.1
1+
github "SDWebImage/SDWebImage" ~> 5.8.0

ios/Classes/AvImageviewImageView.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ - (UIImage *)loadLocalImage:(NSString *)imagePath {
218218

219219
// Load the image from the application assets
220220
NSString *fileNamePath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:imagePath];
221-
;
222221
image = [UIImage imageWithContentsOfFile:fileNamePath];
223222

224223
if (image != nil)

ios/manifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# this is your module manifest and used by Titanium
33
# during compilation, packaging, distribution, etc.
44
#
5-
version: 2.0.1
5+
version: 2.0.2
66
apiversion: 2
77
architectures: armv7 arm64 i386 x86_64
88
description: andreavitale-imageview

ios/module.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/400-Build_Configurations/build_configs.html
88
//
99

10-
CURRENT_MODULE_VERSION="1.5.1"
10+
CURRENT_MODULE_VERSION="1.5.2"
1111
FRAMEWORK_SEARCH_PATHS=$(SRCROOT)/../../modules/iphone/av.imageview/$(CURRENT_MODULE_VERSION)/platform
1212

1313
//OTHER_LDFLAGS=$(inherited)

ios/platform/SDWebImage.framework/Headers/NSData+ImageContentType.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ static const SDImageFormat SDImageFormatTIFF = 3;
2323
static const SDImageFormat SDImageFormatWebP = 4;
2424
static const SDImageFormat SDImageFormatHEIC = 5;
2525
static const SDImageFormat SDImageFormatHEIF = 6;
26+
static const SDImageFormat SDImageFormatPDF = 7;
27+
static const SDImageFormat SDImageFormatSVG = 8;
2628

2729
/**
2830
NSData category about the image content type and UTI.
@@ -43,6 +45,7 @@ static const SDImageFormat SDImageFormatHEIF = 6;
4345
*
4446
* @param format Format as SDImageFormat
4547
* @return The UTType as CFStringRef
48+
* @note For unknown format, `kUTTypeImage` abstract type will return
4649
*/
4750
+ (nonnull CFStringRef)sd_UTTypeFromImageFormat:(SDImageFormat)format CF_RETURNS_NOT_RETAINED NS_SWIFT_NAME(sd_UTType(from:));
4851

@@ -51,6 +54,7 @@ static const SDImageFormat SDImageFormatHEIF = 6;
5154
*
5255
* @param uttype The UTType as CFStringRef
5356
* @return The Format as SDImageFormat
57+
* @note For unknown type, `SDImageFormatUndefined` will return
5458
*/
5559
+ (SDImageFormat)sd_imageFormatFromUTType:(nonnull CFStringRef)uttype;
5660

ios/platform/SDWebImage.framework/Headers/NSImage+Compatibility.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
The underlying Core Graphics image object. This will actually use `CGImageForProposedRect` with the image size.
2020
*/
2121
@property (nonatomic, readonly, nullable) CGImageRef CGImage;
22+
/**
23+
The underlying Core Image data. This will actually use `bestRepresentationForRect` with the image size to find the `NSCIImageRep`.
24+
*/
25+
@property (nonatomic, readonly, nullable) CIImage *CIImage;
2226
/**
2327
The scale factor of the image. This wil actually use `bestRepresentationForRect` with image size and pixel size to calculate the scale factor. If failed, use the default value 1.0. Should be greater than or equal to 1.0.
2428
*/
@@ -38,6 +42,16 @@ The underlying Core Graphics image object. This will actually use `CGImageForPro
3842
*/
3943
- (nonnull instancetype)initWithCGImage:(nonnull CGImageRef)cgImage scale:(CGFloat)scale orientation:(CGImagePropertyOrientation)orientation;
4044

45+
/**
46+
Initializes and returns an image object with the specified Core Image object. The representation is `NSCIImageRep`.
47+
48+
@param ciImage A Core Image image object
49+
@param scale The image scale factor
50+
@param orientation The orientation of the image data
51+
@return The image object
52+
*/
53+
- (nonnull instancetype)initWithCIImage:(nonnull CIImage *)ciImage scale:(CGFloat)scale orientation:(CGImagePropertyOrientation)orientation;
54+
4155
/**
4256
Returns an image object with the scale factor. The representation is created from the image data.
4357
@note The difference between these this and `initWithData:` is that `initWithData:` will always use `backingScaleFactor` as scale factor.

ios/platform/SDWebImage.framework/Headers/SDAnimatedImage.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272

7373
// This class override these methods from UIImage(NSImage), and it supports NSSecureCoding.
7474
// You should use these methods to create a new animated image. Use other methods just call super instead.
75+
// Pay attention, when the animated image frame count <= 1, all the `SDAnimatedImageProvider` protocol methods will return nil or 0 value, you'd better check the frame count before usage and keep fallback.
7576
+ (nullable instancetype)imageNamed:(nonnull NSString *)name; // Cache in memory, no Asset Catalog support
7677
#if __has_include(<UIKit/UITraitCollection.h>)
7778
+ (nullable instancetype)imageNamed:(nonnull NSString *)name inBundle:(nullable NSBundle *)bundle compatibleWithTraitCollection:(nullable UITraitCollection *)traitCollection; // Cache in memory, no Asset Catalog support

ios/platform/SDWebImage.framework/Headers/SDAnimatedImageView.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@
8181
*/
8282
@property (nonatomic, assign) BOOL resetFrameIndexWhenStopped;
8383

84+
/**
85+
If the image has more than one frame, set this value to `YES` will automatically
86+
play/stop the animation when the view become visible/invisible.
87+
Default is YES.
88+
*/
89+
@property (nonatomic, assign) BOOL autoPlayAnimatedImage;
90+
8491
/**
8592
You can specify a runloop mode to let it rendering.
8693
Default is NSRunLoopCommonModes on multi-core device, NSDefaultRunLoopMode on single-core device

0 commit comments

Comments
 (0)