Fix visibility of navigation bar when searching the forwarding screen. (#1357)

* Fix visibility of navigation bar when searching the forwarding screen.

- Update Introspect and replace deprecated calls with new ones.
- Remove obsoleted colours from DesignKit.
This commit is contained in:
Doug
2023-07-19 16:55:21 +01:00
committed by GitHub
parent b677e5cbd7
commit 66eea98b33
14 changed files with 39 additions and 78 deletions
@@ -15,8 +15,8 @@
//
import DesignTokens
import Introspect
import SwiftUI
import SwiftUIIntrospect
public extension TextFieldStyle where Self == ElementTextFieldStyle {
static func elementInput(labelText: String? = nil,
@@ -131,7 +131,7 @@ public struct ElementTextFieldStyle: TextFieldStyle {
}
.onTapGesture { isFocused = true } // Set focus with taps outside of the text field
}
.introspectTextField { textField in
.introspect(.textField, on: .iOS(.v16)) { textField in
textField.clearButtonMode = .whileEditing
textField.attributedPlaceholder = NSAttributedString(string: textField.placeholder ?? "",
attributes: [NSAttributedString.Key.foregroundColor: UIColor(placeholderColor)])