From 7ce055ac1d525fe80969593eccf6ca24f93b331c Mon Sep 17 00:00:00 2001 From: Justin Mazzocchi <2831158+jzzocc@users.noreply.github.com> Date: Sun, 27 Sep 2020 22:22:01 -0700 Subject: [PATCH] Change header aspect ratio --- Views/AccountHeaderView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Views/AccountHeaderView.swift b/Views/AccountHeaderView.swift index 6469cb3..837b89f 100644 --- a/Views/AccountHeaderView.swift +++ b/Views/AccountHeaderView.swift @@ -68,6 +68,8 @@ private extension AccountHeaderView { addSubview(headerImageView) addSubview(baseStackView) headerImageView.translatesAutoresizingMaskIntoConstraints = false + headerImageView.contentMode = .scaleAspectFill + headerImageView.clipsToBounds = true baseStackView.translatesAutoresizingMaskIntoConstraints = false baseStackView.axis = .vertical @@ -91,7 +93,7 @@ private extension AccountHeaderView { let headerImageAspectRatioConstraint = headerImageView.heightAnchor.constraint( equalTo: headerImageView.widthAnchor, - multiplier: 9 / 16) + multiplier: 1 / 3) headerImageAspectRatioConstraint.priority = .init(999)