From 65356424d9684ee18def5e8ca73b7913506b8ea0 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 27 Sep 2019 14:09:28 -0500 Subject: [PATCH] Change reader button to be a system button --- iOS/Article/ArticleExtractorButton.swift | 17 ----------------- iOS/Article/ArticleViewController.swift | 7 ++++++- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/iOS/Article/ArticleExtractorButton.swift b/iOS/Article/ArticleExtractorButton.swift index 2a1b7b1e8..8806f1676 100644 --- a/iOS/Article/ArticleExtractorButton.swift +++ b/iOS/Article/ArticleExtractorButton.swift @@ -16,23 +16,6 @@ enum ArticleExtractorButtonState { } class ArticleExtractorButton: UIButton { - - init() { - super.init(frame: CGRect(x: 0, y: 0, width: 44, height: 44)) - setImage(AppAssets.articleExtractorOff, for: .normal) - } - - required init?(coder: NSCoder) { - super.init(coder: coder) - } - - override var isEnabled: Bool { - didSet { - if isEnabled != oldValue { - tintColor = isEnabled ? nil : UIColor.secondaryLabel - } - } - } var buttonState: ArticleExtractorButtonState = .off { didSet { diff --git a/iOS/Article/ArticleViewController.swift b/iOS/Article/ArticleViewController.swift index 6bf0b5934..da7632ed5 100644 --- a/iOS/Article/ArticleViewController.swift +++ b/iOS/Article/ArticleViewController.swift @@ -31,7 +31,12 @@ class ArticleViewController: UIViewController { @IBOutlet private weak var browserBarButtonItem: UIBarButtonItem! @IBOutlet private weak var webViewContainer: UIView! - private var articleExtractorButton = ArticleExtractorButton() + private var articleExtractorButton: ArticleExtractorButton = { + let button = ArticleExtractorButton(type: .system) + button.setImage(AppAssets.articleExtractorOff, for: .normal) + return button + }() + private var webView: WKWebView! weak var coordinator: SceneCoordinator!