Make iOS settings more idiomatic in some small ways: shorter labels, use of footers, etc.

This commit is contained in:
Brent Simmons committed 2026-11-14 21:52:58 -08:00
1 parent 7ed45c370b
commit f027a0f1d5
6 files changed
+58 -77

No files matched your search

+4 -14
View File
@@ -59,27 +59,17 @@ private extension CopyableLabel {
// MARK: - SwiftUI
/// SwiftUI wrapper for `CopyableLabel`. Defaults to centered, secondary-colored body text.
/// SwiftUI wrapper for `CopyableLabel`: centered, secondary-colored body text.
struct CopyableText: UIViewRepresentable {
let text: String
let font: UIFont
let textColor: UIColor
let textAlignment: NSTextAlignment
init(text: String, font: UIFont = UIFont.preferredFont(forTextStyle: .body), textColor: UIColor = UIColor.secondaryLabel, textAlignment: NSTextAlignment = .center) {
self.text = text
self.font = font
self.textColor = textColor
self.textAlignment = textAlignment
}
func makeUIView(context: Context) -> CopyableLabel {
let label = CopyableLabel()
label.font = font
label.font = UIFont.preferredFont(forTextStyle: .body)
label.adjustsFontForContentSizeCategory = true
label.textColor = textColor
label.textAlignment = textAlignment
label.textColor = UIColor.secondaryLabel
label.textAlignment = .center
label.numberOfLines = 0
return label
}