Reversed the array to first check views at the front.

This commit is contained in:
Kevin G Christiano 2019-12-12 09:27:13 -05:00
parent 6cc31113f7
commit 3db8cf2c3b

View File

@ -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)
}