diff --git a/MMMLoadable.podspec b/MMMLoadable.podspec index 73096b4..198e905 100644 --- a/MMMLoadable.podspec +++ b/MMMLoadable.podspec @@ -6,7 +6,7 @@ Pod::Spec.new do |s| s.name = "MMMLoadable" - s.version = "2.2.1" + s.version = "2.2.2" s.summary = "A simple model for async calculations" s.description = "#{s.summary}." s.homepage = "https://github.com/mediamonks/#{s.name}" diff --git a/Sources/MMMLoadableObjC/MMMLoadableImage.m b/Sources/MMMLoadableObjC/MMMLoadableImage.m index 422fb7e..5aaaf36 100644 --- a/Sources/MMMLoadableObjC/MMMLoadableImage.m +++ b/Sources/MMMLoadableObjC/MMMLoadableImage.m @@ -224,7 +224,10 @@ - (NSNumber *)imageAnimationDelayTime:(CGImageSourceRef)source { return nil; } NSDictionary *gifProps = (__bridge NSDictionary *)(CFDictionaryRef)CFDictionaryGetValue(props, kCGImagePropertyGIFDictionary); - NSDictionary *webpProps = (__bridge NSDictionary *)(CFDictionaryRef)CFDictionaryGetValue(props, kCGImagePropertyWebPDictionary); + NSDictionary *webpProps = nil; + if (@available(iOS 14.0, *)) { + webpProps = (__bridge NSDictionary *)(CFDictionaryRef)CFDictionaryGetValue(props, kCGImagePropertyWebPDictionary); + } CFRelease(props); if (gifProps) { return (NSNumber *)gifProps[(NSString *)kCGImagePropertyGIFDelayTime]; @@ -270,7 +273,7 @@ - (UIImage *)imageWithData:(NSData *)data { [images addObject:image]; } - NSTimeInterval delayTime = MAX([delayTimeNum doubleValue], 0.1); + NSTimeInterval delayTime = MAX([delayTimeNum doubleValue], 0.04); UIImage *result = [UIImage animatedImageWithImages:images duration:delayTime * count];