An open API service indexing awesome lists of open source software.

https://github.com/schwa/xform

Demo project showing SwiftUI's new "subViewsOf" APIs
https://github.com/schwa/xform

Last synced: 10 days ago
JSON representation

Demo project showing SwiftUI's new "subViewsOf" APIs

Awesome Lists containing this project

README

        

# XForm

An alternative "Form" API for SwiftUI highlighting Swift's new 'ForEach(subviewsOf:)' and 'Group(subViewsOf:)' APIs

**further description forthcoming**

```swift
struct XForm : View where Content: View {
let content: Content

init(@ViewBuilder content: () -> Content) {
self.content = content()
}

var body: some View {
ScrollView(.vertical) {
VStack {
Group(subviewsOf: content) { subviews in
ForEach(subviews.dropLast()) { subview in
subview
Divider()
}
subviews.last
}
}
.padding([.leading, .trailing])
}
}
}
```

## Screenshot

![alt text]()