Hi.
I want to implement a template selection such as Pages and Numbers. Currently I am using DocumentGroup scene on SwiftUI.
How can I implement it?
init(
newDocument: @autoclosure @escaping () -> Document,
@ViewBuilder editor: @escaping (FileDocumentConfiguration<Document>) -> Content
)
The initializer of DocumentGroup may suggest that the newDocument argument should open template selector and return one when the selector is closed. But I think that it may beome a complicated implementation.
What is a right way to implement the template selector?