Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/krzyzanowskim/swiftui.splitview
https://github.com/krzyzanowskim/swiftui.splitview
splitview swiftui swiftui-components
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/krzyzanowskim/swiftui.splitview
- Owner: krzyzanowskim
- License: mit
- Created: 2022-07-25T11:15:38.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-25T14:47:25.000Z (over 2 years ago)
- Last Synced: 2024-04-14T07:11:18.899Z (9 months ago)
- Topics: splitview, swiftui, swiftui-components
- Language: Swift
- Homepage: https://swift.best
- Size: 23.4 KB
- Stars: 45
- Watchers: 4
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# SplitView
Experimental SwiftUI.SplitView (Vertical/Horizontal) view.
Why? Because NSSplitView takes too much energy from whoever willing to make it work predictably.
https://user-images.githubusercontent.com/758033/180766261-ad9ce52f-cb9b-4112-bd9c-1df6cb777033.mp4
# Use
```swift
import SplitViewstruct ContentView: View {
var body: some View {
SplitView(orientation: .constant(.horizontal)) {
SampleContent()
SampleContent()
SplitView(orientation: .constant(.vertical)) {
SampleContent()
SampleContent()
SampleContent()
}
SampleContent()
SampleContent()
SplitView(orientation: .constant(.vertical)) {
SampleContent()
SampleContent()
SampleContent()
}
}
}
}private struct SampleContent: View {
var body: some View {
ZStack {
Rectangle()
.foregroundColor(.yellow)HStack {
Text("Lorem ipsum")
}
}
}
}
```# Contribution
Work in progress 👷♂️
Feel free to Discuss and submit Pull Request## Design notes
![FYgUFPSXkAAvLdn](https://user-images.githubusercontent.com/758033/180767478-f2522595-31ff-4790-a5ff-e37ec14c8eb0.jpg)