mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2024-12-23 08:09:41 +01:00
Change reader button to be a system button
This commit is contained in:
parent
67e6408da0
commit
65356424d9
@ -17,23 +17,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 {
|
||||
if buttonState != oldValue {
|
||||
|
@ -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!
|
||||
|
Loading…
Reference in New Issue
Block a user