Fix the accident changes of Swift API naming for `sd_imageDataAsFormat:`. We should keep previous naming `sd_imageData(as:)`

This commit is contained in:
DreamPiggy 2018-10-29 12:52:17 +08:00
parent cabda5890f
commit 67499263a8
1 changed files with 3 additions and 3 deletions

View File

@ -52,7 +52,7 @@
@param imageFormat The specify image format
@return The encoded data. If can't encode, return nil
*/
- (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat;
- (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat NS_SWIFT_NAME(sd_imageData(as:));
/**
Encode the current image to data with the specify image format and compression quality
@ -61,7 +61,7 @@
@param compressionQuality The quality of the resulting image data. Value between 0.0-1.0. Some coders may not support compression quality.
@return The encoded data. If can't encode, return nil
*/
- (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality;
- (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality NS_SWIFT_NAME(sd_imageData(as:compressionQuality:));
/**
Encode the current image to data with the specify image format and compression quality, allow specify animate/static control
@ -71,6 +71,6 @@
@param firstFrameOnly Even if the image is animated image, encode the first frame only as static image.
@return The encoded data. If can't encode, return nil
*/
- (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality firstFrameOnly:(BOOL)firstFrameOnly;
- (nullable NSData *)sd_imageDataAsFormat:(SDImageFormat)imageFormat compressionQuality:(double)compressionQuality firstFrameOnly:(BOOL)firstFrameOnly NS_SWIFT_NAME(sd_imageData(as:compressionQuality:firstFrameOnly:));
@end