mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
🚑️ Fixes #4483 by showing bars on rotation
On rotation, if the device is a .phone and it is transitioning to a `.regular` horizontal size class—it’s big—bars in the article view are surfaced to workaround a crash. This doesn’t affect behaviour on smaller iPhones or iPads.
This commit is contained in:
@@ -189,6 +189,14 @@ class ArticleViewController: UIViewController {
|
||||
view.layoutIfNeeded()
|
||||
}
|
||||
|
||||
override func willTransition(to newCollection: UITraitCollection, with coordinator: any UIViewControllerTransitionCoordinator) {
|
||||
// We only want to show bars when rotating to horizontalSizeClass == .regular
|
||||
// (i.e., big) iPhones to resolve crash #4483.
|
||||
if UIDevice.current.userInterfaceIdiom == .phone && newCollection.horizontalSizeClass == .regular {
|
||||
currentWebViewController?.showBars()
|
||||
}
|
||||
}
|
||||
|
||||
func updateUI() {
|
||||
|
||||
guard let article = article else {
|
||||
|
||||
Reference in New Issue
Block a user