From b74f85627d3b7c578806d03ddd674ef67b98e6a8 Mon Sep 17 00:00:00 2001 From: Leptos Date: Mon, 1 Oct 2018 13:14:43 -0700 Subject: [PATCH] Resolves issue #74 - implement "2x" images on retina devices --- Source/Models/Comic/Comic.m | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Models/Comic/Comic.m b/Source/Models/Comic/Comic.m index 1760401..82cf2d8 100644 --- a/Source/Models/Comic/Comic.m +++ b/Source/Models/Comic/Comic.m @@ -37,6 +37,11 @@ - (instancetype)initComicWithDictionary:(NSDictionary *)dictionary { self.isInteractive = [dictionary[kIsInteractiveKey] boolValue]; self.explainURLString = [NSString stringWithFormat:@"%@/%@", kExplainURLBase, @(self.num)]; + if ((UIScreen.mainScreen.scale >= 2) && (self.comicID.integerValue >= 1084)) { + NSString *patchingImageString = [self.imageURLString stringByDeletingPathExtension]; + self.imageURLString = [patchingImageString stringByAppendingString:@"_2x.png"]; + } + NSInteger day = [self.day integerValue]; NSInteger month = [self.month integerValue]; NSInteger year = [self.year integerValue];