From 0229b7fdab5a8f18cd26aad63019b2362feeec06 Mon Sep 17 00:00:00 2001 From: krugerk <4656811+krugerk@users.noreply.github.com> Date: Sat, 4 Jul 2020 13:45:22 +0200 Subject: [PATCH] show placeholder graph right away a placeholder image is being used until the goal is loaded however this is set relatively late - in `viewDidAppear`, which means the user sees the view containing a large white/blank area where the graph will appear, then sees the placeholder, then sees the updated graph with this change, the placeholder is set right straight away and thus is seen as the goalVC is being slid into view --- BeeSwift/GoalViewController.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BeeSwift/GoalViewController.swift b/BeeSwift/GoalViewController.swift index 3f5e15c07..817ec2859 100644 --- a/BeeSwift/GoalViewController.swift +++ b/BeeSwift/GoalViewController.swift @@ -111,6 +111,8 @@ class GoalViewController: UIViewController, UITableViewDelegate, UITableViewData make.left.equalTo(self.goalImageScrollView) make.right.equalTo(self.goalImageScrollView) } + self.goalImageView.image = UIImage(named: "GraphPlaceholder") + self.view.addSubview(self.deltasLabel) self.deltasLabel.snp.makeConstraints { (make) in @@ -394,6 +396,7 @@ class GoalViewController: UIViewController, UITableViewDelegate, UITableViewData } override func viewDidAppear(_ animated: Bool) { + super.viewDidAppear(animated) self.refreshGoal() }