What’s this?
Broken titleView
layout bug in Xcode 14 Beta 5 reproduction repository.
Xcode 14 Beta 5 |
Xcode 14 Beta 4 |
Xcode 13.4.1 |
|
|
|
|
let titleLabel = UILabel() |
|
titleLabel.text = title |
|
titleLabel.font = .preferredFont(forTextStyle: .headline) |
|
let subTitleLabel = UILabel() |
|
subTitleLabel.text = subTitle |
|
subTitleLabel.font = .preferredFont(forTextStyle: .caption1) |
|
let stackView = UIStackView(arrangedSubviews: [titleLabel, subTitleLabel]) |
|
stackView.alignment = .center |
|
stackView.axis = .vertical |
|
stackView.distribution = .equalCentering |
|
|
|
navigationItem.titleView = stackView |
GitHub
View Github