Xcode 12.3 | SwiftUI 2.0 | macOS 11
I'm trying to get a custom initializer to write this:
Section("TITLE") { ... content ... }
Instead of this:
Section(header: Text("TITLE") { ... content ... }
But I cannot create a custom initializer because self.initis not recognized:
extension Section {
init(_ title: String, @escaping () -> Content) {
self.init(........ <--- No autocompletions for self initializers
}
}
I have the same problem with custom inits for Buttons.
Does anyone knows how to access to that initializers from extensions?