From 3db8cf2c3b7ca6d4d98cea04a49f82d8f4657c9e Mon Sep 17 00:00:00 2001 From: Kevin G Christiano Date: Thu, 12 Dec 2019 09:27:13 -0500 Subject: [PATCH] Reversed the array to first check views at the front. --- MVMCoreUI/Molecules/Items/TableViewCell.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/MVMCoreUI/Molecules/Items/TableViewCell.swift b/MVMCoreUI/Molecules/Items/TableViewCell.swift index 13faeb42..2c14f9be 100644 --- a/MVMCoreUI/Molecules/Items/TableViewCell.swift +++ b/MVMCoreUI/Molecules/Items/TableViewCell.swift @@ -237,11 +237,13 @@ import UIKit var queue = [UIView]() - for view in views { + // Reversed the array to first check views at the front. + for view in views.reversed() { // Only one Label will have a hero in a table cell. if let label = view as? Label, label.hero != nil { return label } + queue.append(contentsOf: view.subviews) }