Update image view title margins before, instead of after, layout.

This commit is contained in:
Brent Simmons committed 2026-11-04 11:52:23 -08:00
1 parent 1e16ba125e
commit a2a966f28d
1 file changed
+5 -1
+5 -1
View File
@@ -72,9 +72,13 @@ final class ImageViewController: UIViewController {
titleBackground.layer.cornerRadius = 6
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
layoutTitleLabel()
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
layoutTitleLabel()
let imageScrollViewSize = imageScrollView.bounds.size
if imageScrollViewSize != lastImageScrollViewSize {