Change header aspect ratio
This commit is contained in:
parent
6d3c66d251
commit
7ce055ac1d
|
@ -68,6 +68,8 @@ private extension AccountHeaderView {
|
||||||
addSubview(headerImageView)
|
addSubview(headerImageView)
|
||||||
addSubview(baseStackView)
|
addSubview(baseStackView)
|
||||||
headerImageView.translatesAutoresizingMaskIntoConstraints = false
|
headerImageView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
|
headerImageView.contentMode = .scaleAspectFill
|
||||||
|
headerImageView.clipsToBounds = true
|
||||||
baseStackView.translatesAutoresizingMaskIntoConstraints = false
|
baseStackView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
baseStackView.axis = .vertical
|
baseStackView.axis = .vertical
|
||||||
|
|
||||||
|
@ -91,7 +93,7 @@ private extension AccountHeaderView {
|
||||||
|
|
||||||
let headerImageAspectRatioConstraint = headerImageView.heightAnchor.constraint(
|
let headerImageAspectRatioConstraint = headerImageView.heightAnchor.constraint(
|
||||||
equalTo: headerImageView.widthAnchor,
|
equalTo: headerImageView.widthAnchor,
|
||||||
multiplier: 9 / 16)
|
multiplier: 1 / 3)
|
||||||
|
|
||||||
headerImageAspectRatioConstraint.priority = .init(999)
|
headerImageAspectRatioConstraint.priority = .init(999)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue