Skip to content

Commit

Permalink
Added a workaround for a bizarre UIKit bug when reading news stories …
Browse files Browse the repository at this point in the history
…on iPad.
  • Loading branch information
twostraws committed May 6, 2019
1 parent dc57a3e commit 9ffeb0f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Unwrap/Activities/News/NewsCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class NewsCoordinator: Coordinator {
init() {
// Set up the master view controller
primaryNavigationController.navigationBar.prefersLargeTitles = true

// FIXME: Disable transluceny on this navigation bar, otherwise on iPad selecting a news story makes the navigation bar go gray.
primaryNavigationController.navigationBar.isTranslucent = false
primaryNavigationController.coordinator = self

let viewController = NewsViewController(style: .plain)
Expand Down
1 change: 0 additions & 1 deletion Unwrap/Activities/News/NewsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class NewsViewController: UITableViewController, UIViewControllerPreviewingDeleg

title = "News"
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Buy Swift Books", style: .plain, target: coordinator, action: #selector(NewsCoordinator.buyBooks))
extendedLayoutIncludesOpaqueBars = true

dataSource.delegate = self
tableView.dataSource = dataSource
Expand Down

0 comments on commit 9ffeb0f

Please sign in to comment.