Skip to content

Commit

Permalink
Merge pull request #3399 from ibaldado/bug/T238786
Browse files Browse the repository at this point in the history
Header labels are thrown off on rotation
  • Loading branch information
joewalsh authored Jan 7, 2020
2 parents 5c154e3 + 4abbe27 commit ecf6f17
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Wikipedia/Code/CollectionViewHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ class CollectionViewHeader: SizeThatFitsReusableView {
button.titleLabel?.font = UIFont.wmf_font(buttonTextStyle, compatibleWithTraitCollection: traitCollection)
}

override func layoutMarginsDidChange() {
super.layoutMarginsDidChange()
setNeedsLayout()
}

override func sizeThatFits(_ size: CGSize, apply: Bool) -> CGSize {
let additionalMargins: UIEdgeInsets
switch style {
Expand Down

0 comments on commit ecf6f17

Please sign in to comment.