diff --git a/AltStore/News/NewsViewController.swift b/AltStore/News/NewsViewController.swift index 0e9fc396..7764f508 100644 --- a/AltStore/News/NewsViewController.swift +++ b/AltStore/News/NewsViewController.swift @@ -450,6 +450,10 @@ extension NewsViewController: UICollectionViewDelegateFlowLayout return previousSize } + // Take layout margins into account. + self.prototypeCell.layoutMargins.left = self.view.layoutMargins.left + self.prototypeCell.layoutMargins.right = self.view.layoutMargins.right + let widthConstraint = self.prototypeCell.contentView.widthAnchor.constraint(equalToConstant: collectionView.bounds.width) NSLayoutConstraint.activate([widthConstraint]) defer { NSLayoutConstraint.deactivate([widthConstraint]) }