Add copy capabilities to Feed URL and Homepage labels. Issue #1239.

This commit is contained in:
Maurice Parker
2019-11-03 07:18:00 -06:00
parent 68fe9e2b62
commit 27e00ee5c7
4 changed files with 87 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
//
// FeedInspectorLabel.swift
// NetNewsWire-iOS
//
// Created by Maurice Parker on 11/3/19.
// Copyright © 2019 Ranchero Software. All rights reserved.
//
import SwiftUI
struct FeedInspectorLabelView : UIViewRepresentable {
let text: String
func makeUIView(context: Context) -> InteractiveLabel {
return InteractiveLabel()
}
func updateUIView(_ label: InteractiveLabel, context: Context) {
label.text = text
}
}

View File

@@ -60,10 +60,10 @@ struct FeedInspectorView : View {
}
}
Section(header: Text("HOME PAGE")) {
Text(verbatim: self.viewModel.homePageURL)
FeedInspectorLabelView(text: self.viewModel.homePageURL)
}
Section(header: Text("FEED URL")) {
Text(verbatim: self.viewModel.feedLinkURL)
FeedInspectorLabelView(text: self.viewModel.feedLinkURL)
}
}
.onDisappear { self.viewModel.save() }