diff --git a/Wikipedia/Code/CollectionViewHeader.swift b/Wikipedia/Code/CollectionViewHeader.swift index 87364f524c0..f42f14eacf6 100644 --- a/Wikipedia/Code/CollectionViewHeader.swift +++ b/Wikipedia/Code/CollectionViewHeader.swift @@ -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 {