Mark the API available for HEIC/AWebP coders, update the example
This commit is contained in:
parent
d09ff5a654
commit
53b2420789
|
@ -33,7 +33,10 @@
|
|||
// iOS 13 does not supports WebP, use third-party codec
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageWebPCoder sharedCoder]];
|
||||
}
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]]; // For HEIC static/animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
if (@available(iOS 13, tvOS 13, macOS 10.15, watchOS 6, *)) {
|
||||
// For HEIC animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]];
|
||||
}
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
|
||||
// Override point for customization after application launch.
|
||||
|
|
|
@ -26,7 +26,10 @@
|
|||
// iOS 13 does not supports WebP, use third-party codec
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageWebPCoder sharedCoder]];
|
||||
}
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]]; // For HEIC static/animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
if (@available(iOS 13, tvOS 13, macOS 10.15, watchOS 6, *)) {
|
||||
// For HEIC animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(NSNotification *)aNotification {
|
||||
|
|
|
@ -27,7 +27,10 @@
|
|||
// iOS 13 does not supports WebP, use third-party codec
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageWebPCoder sharedCoder]];
|
||||
}
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]]; // For HEIC static/animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
if (@available(iOS 13, tvOS 13, macOS 10.15, watchOS 6, *)) {
|
||||
// For HEIC animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]];
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,10 @@
|
|||
// iOS 13 does not supports WebP, use third-party codec
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageWebPCoder sharedCoder]];
|
||||
}
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]]; // For HEIC static/animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
if (@available(iOS 13, tvOS 13, macOS 10.15, watchOS 6, *)) {
|
||||
// For HEIC animated image. Animated image is new introduced in iOS 13, but it contains performance issue for now.
|
||||
[[SDImageCodersManager sharedManager] addCoder:[SDImageHEICCoder sharedCoder]];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)applicationDidBecomeActive {
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
@note Currently Image/IO seems does not supports WebP encoding, if you need WebP encoding, use the custom codec below.
|
||||
@note If you need to support lower firmware version for WebP, you can have a try at https://github.com/SDWebImage/SDWebImageWebPCoder
|
||||
*/
|
||||
API_AVAILABLE(ios(14.0), tvos(14.0), macos(11.0), watchos(7.0))
|
||||
@interface SDImageAWebPCoder : SDImageIOAnimatedCoder <SDProgressiveImageCoder, SDAnimatedImageCoder>
|
||||
|
||||
@property (nonatomic, class, readonly, nonnull) SDImageAWebPCoder *sharedCoder;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
@note This coder is not in the default coder list for now, since HEIC animated image is really rare, and Apple's implementation still contains performance issues. You can enable if you need this.
|
||||
@note If you need to support lower firmware version for HEIF, you can have a try at https://github.com/SDWebImage/SDWebImageHEIFCoder
|
||||
*/
|
||||
API_AVAILABLE(ios(13.0), tvos(13.0), macos(10.15), watchos(6.0))
|
||||
@interface SDImageHEICCoder : SDImageIOAnimatedCoder <SDProgressiveImageCoder, SDAnimatedImageCoder>
|
||||
|
||||
@property (nonatomic, class, readonly, nonnull) SDImageHEICCoder *sharedCoder;
|
||||
|
|
Loading…
Reference in New Issue