Skip to content

Commit e835961

Browse files
committed
Mark the class with API_AVAILABLE version check, this framework can only be used on iOS 13/macOS 10.15
1 parent dd4e6f4 commit e835961

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

SDWebImageSVGCoder/Classes/SDImageSVGCoder.h

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ NS_ASSUME_NONNULL_BEGIN
1515

1616
static const SDImageFormat SDImageFormatSVG = 12;
1717

18+
API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0))
1819
@interface SDImageSVGCoder : NSObject <SDImageCoder>
1920

2021
@property (nonatomic, class, readonly) SDImageSVGCoder *sharedCoder;

SDWebImageSVGCoder/Classes/SDWebImageSVGCoderDefine.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@
1515
A BOOL value which specify whether we prefer the actual bitmap representation instead of vector representation for SVG image. This is because the UIImage on iOS 13+ (NSImage on macOS 10.15+) can use the vector image format, which support dynamic scale without losing any detail. However, for some image processing logic, user may need the actual bitmap representation to manage pixels. (NSNumber)
1616
If you don't provide this value, use NO for default value and prefer the vector format when possible.
1717
*/
18-
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextSVGPrefersBitmap;
18+
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextSVGPrefersBitmap API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
1919

2020
/**
2121
A CGSize raw value which specify the desired SVG image size during image loading. Because vector image like SVG format, may not contains a fixed size, or you want to get a larger size bitmap representation UIImage. (NSValue)
2222
If you don't provide this value, use viewBox size of SVG for default value;
2323
*/
24-
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextSVGImageSize;
24+
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextSVGImageSize API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));
2525

2626
/**
2727
A BOOL value which specify the whether SVG image should keep aspect ratio during image loading. Because when you specify image size via `SDWebImageContextSVGImageSize`, we need to know whether to keep aspect ratio or not when image size aspect ratio is not equal to SVG viewBox size aspect ratio. (NSNumber)
2828
If you don't provide this value, use YES for default value.
2929
*/
30-
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextSVGImagePreserveAspectRatio;
30+
FOUNDATION_EXPORT SDWebImageContextOption _Nonnull const SDWebImageContextSVGImagePreserveAspectRatio API_AVAILABLE(macos(10.15), ios(13.0), watchos(6.0), tvos(13.0));

0 commit comments

Comments
 (0)