Reload Article images when their availablity notification arrives. Issue #1317

This commit is contained in:
Maurice Parker
2019-11-18 19:33:31 -06:00
parent fc235a029e
commit 198dec68b1
4 changed files with 25 additions and 51 deletions

View File

@@ -1,50 +0,0 @@
//
// ThemedNavigationController.swift
// NetNewsWire
//
// Created by Maurice Parker on 8/22/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import UIKit
class ThemedNavigationController: UINavigationController {
static func template() -> UINavigationController {
let navController = ThemedNavigationController()
navController.configure()
return navController
}
static func template(rootViewController: UIViewController) -> UINavigationController {
let navController = ThemedNavigationController(rootViewController: rootViewController)
navController.configure()
return navController
}
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
super.traitCollectionDidChange(previousTraitCollection)
if traitCollection.userInterfaceStyle != previousTraitCollection?.userInterfaceStyle {
configure()
}
}
private func configure() {
isToolbarHidden = false
view.backgroundColor = AppAssets.barBackgroundColor
let navigationAppearance = UINavigationBarAppearance()
navigationAppearance.backgroundColor = AppAssets.barBackgroundColor
navigationAppearance.titleTextAttributes = [.foregroundColor: UIColor.label]
navigationAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]
navigationBar.standardAppearance = navigationAppearance
navigationBar.tintColor = AppAssets.primaryAccentColor
let toolbarAppearance = UIToolbarAppearance()
toolbarAppearance.backgroundColor = AppAssets.barBackgroundColor
toolbar.standardAppearance = toolbarAppearance
toolbar.compactAppearance = toolbarAppearance
toolbar.tintColor = AppAssets.primaryAccentColor
}
}