From 985d30a40140a1ad0fcb8566903b9d89ad96b474 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Mon, 6 Jul 2020 17:48:19 -0400 Subject: [PATCH] Add background to image descriptions so they're visible against light backgrounds Closes #102 --- .../Large Image/LargeImageViewController.swift | 5 +++-- .../Large Image/LargeImageViewController.xib | 14 ++++++++------ 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/Tusker/Screens/Large Image/LargeImageViewController.swift b/Tusker/Screens/Large Image/LargeImageViewController.swift index 0be4aea1db..f0ba116eb4 100644 --- a/Tusker/Screens/Large Image/LargeImageViewController.swift +++ b/Tusker/Screens/Large Image/LargeImageViewController.swift @@ -86,8 +86,9 @@ class LargeImageViewController: UIViewController, UIScrollViewDelegate, LargeIma scrollView.delegate = self - if let imageDescription = imageDescription { - descriptionLabel.text = imageDescription + if let imageDescription = imageDescription, + !imageDescription.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty { + descriptionLabel.text = imageDescription.trimmingCharacters(in: .whitespacesAndNewlines) } else { bottomControlsView.isHidden = true } diff --git a/Tusker/Screens/Large Image/LargeImageViewController.xib b/Tusker/Screens/Large Image/LargeImageViewController.xib index 5656e29605..ed21b4cc33 100644 --- a/Tusker/Screens/Large Image/LargeImageViewController.xib +++ b/Tusker/Screens/Large Image/LargeImageViewController.xib @@ -1,8 +1,9 @@ - + - + + @@ -70,23 +71,25 @@ - + + + - + @@ -101,7 +104,6 @@ -