mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-25 01:31:02 +00:00
Change header aspect ratio
This commit is contained in:
parent
6d3c66d251
commit
7ce055ac1d
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue