From 9e6c5ec9174da35563eb7dc464d2d9f19a41fd4b Mon Sep 17 00:00:00 2001 From: Andrea Date: Thu, 25 Jun 2015 12:00:46 +0200 Subject: [PATCH] Fix Photos that doesn't fill the view Photos with lower-res doesn't fill view on iPhone 6 Plus --- KenBurns/JBKenBurnsView.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/KenBurns/JBKenBurnsView.m b/KenBurns/JBKenBurnsView.m index 42fa9a1..52b2c1c 100755 --- a/KenBurns/JBKenBurnsView.m +++ b/KenBurns/JBKenBurnsView.m @@ -324,7 +324,7 @@ - (float)getResizeRatioFromImage:(UIImage *)image width:(float)frameWidth height { heightDiff = frameHeight - image.size.height; - if (widthDiff > heightDiff) + if (widthDiff < heightDiff) resizeRatio = frameWidth / image.size.width; else resizeRatio = self.bounds.size.height / image.size.height; @@ -350,7 +350,7 @@ - (float)getResizeRatioFromImage:(UIImage *)image width:(float)frameWidth height { heightDiff = frameHeight - image.size.height; - if (widthDiff > heightDiff) + if (widthDiff < heightDiff) resizeRatio = frameWidth / image.size.width; else resizeRatio = frameHeight / image.size.height;