Răsfoiți Sursa

change image scale's default value

ibireme 9 ani în urmă
părinte
comite
f828be09b1
3 a modificat fișierele cu 3 adăugiri și 3 ștergeri
  1. 1 1
      Framework/Info.plist
  2. 1 1
      YYImage.podspec
  3. 1 1
      YYImage/YYImage.m

+ 1 - 1
Framework/Info.plist

@@ -15,7 +15,7 @@
 	<key>CFBundlePackageType</key>
 	<string>FMWK</string>
 	<key>CFBundleShortVersionString</key>
-	<string>0.9.0</string>
+	<string>0.9.1</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleVersion</key>

+ 1 - 1
YYImage.podspec

@@ -1,7 +1,7 @@
 Pod::Spec.new do |s|
   s.name         = 'YYImage'
   s.summary      = 'Image framework for iOS to display/encode/decode animated WebP, APNG, GIF, and more.'
-  s.version      = '0.9.0'
+  s.version      = '0.9.1'
   s.license      = { :type => 'MIT', :file => 'LICENSE' }
   s.authors      = { 'ibireme' => 'ibireme@gmail.com' }
   s.social_media_url = 'http://blog.ibireme.com'

+ 1 - 1
YYImage/YYImage.m

@@ -144,7 +144,7 @@ static CGFloat _NSStringPathScale(NSString *string) {
 
 - (instancetype)initWithData:(NSData *)data scale:(CGFloat)scale {
     if (data.length == 0) return nil;
-    if (scale <= 0) scale = 1;
+    if (scale <= 0) scale = [UIScreen mainScreen].scale;
     _preloadedLock = OS_SPINLOCK_INIT;
     @autoreleasepool {
         YYImageDecoder *decoder = [YYImageDecoder decoderWithData:data scale:scale];