TextFieldStyle Protocol "makeBody" method hidden

TextFieldStyle protocol is defined as follows:
Code Block
/// 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:
Code Block
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:
Code Block
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
public protocol ButtonStyle {
/// A `View` representing the body of a `Button`.
associatedtype Body : View
/// Creates a `View` representing the body of a `Button`.
///
/// - Parameter configuration: The properties of the button instance being
/// created.
///
/// This method will be called for each instance of `Button` created within
/// a view hierarchy where this style is the current `ButtonStyle`.
func makeBody(configuration: Self.Configuration) -> Self.Body
/// The properties of a `Button` instance being created.
typealias Configuration = ButtonStyleConfiguration
}

Thank you!
Post not yet marked as solved Up vote post of carina0136 Down vote post of carina0136
792 views

Replies

Major +1 on this... TextField is perhaps the most important UI element. Apple, _please fix this for Xcode 12... feels pretty bad for TextFieldStyle to be an empty protocol!
Post not yet marked as solved Up vote reply of O_G Down vote reply of O_G