Post

Replies

Boosts

Views

Activity

TextFieldStyle Protocol "makeBody" method hidden
TextFieldStyle protocol is defined as follows: /// A specification for the appearance and interaction of a `TextField`. @available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *) public protocol TextFieldStyle { } Where the following protocol method is not yet publicly available: public func _body(configuration: TextField<Self._Label>) -> some View Will there be official support for this in the future? Can we implement this for customizing TextField styling, or would that be discouraged? For comparison, other SwiftUI Style protocols (re: ButtonStyle) have a makeBody method publicly available: @available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *) public protocol ButtonStyle { &#9;&#9;/// A `View` representing the body of a `Button`. &#9;&#9;associatedtype Body : View &#9;&#9;/// Creates a `View` representing the body of a `Button`. &#9;&#9;/// &#9;&#9;/// - Parameter configuration: The properties of the button instance being &#9;&#9;///&#9; created. &#9;&#9;/// &#9;&#9;/// This method will be called for each instance of `Button` created within &#9;&#9;/// a view hierarchy where this style is the current `ButtonStyle`. &#9;&#9;func makeBody(configuration: Self.Configuration) -> Self.Body &#9;&#9;/// The properties of a `Button` instance being created. &#9;&#9;typealias Configuration = ButtonStyleConfiguration } Thank you!
1
1
828
Aug ’20