Recently Featured In Top 10 Trending Android and iOS Libraries in October and in 5 iOS libraries to enhance your app!
What is PartitionKit?
What PartitionKit is not ?
PartitionKit as a default requires the SwiftUI Framework to be operational, as such only these platforms are supported:
Top
, which you would like to have on the Bottom
and optionally a Handle
to be used to drag the partitions to different sizes.VPart(top: {
MyTopView()
}, bottom: {
MyBottomView()
}) {
MyHandle()
}
Left
, which you would like to have on the Right
and optionally a Handle
to be used to drag the partitions to different sizes.HPart(left: {
MyLeftView()
}, right: {
MyRightView()
}) {
MyHandle()
}
TopLeft
, TopRight
, BottomLeft
, BottomRight
and optionally a Handle
for the user to drag and resize the views with. GridPart(topLeft: {
MyTopLeftView()
}, topRight: {
MyTopRightView()
}, bottomLeft: {
MyBottomLeftView()
}, bottomRight: {
MyBottomRightView()
}) {
MyHandle()
}
Copy and Paste this I have added Named pictures for how the views should look, Im using dark mode so light mode colors may look different.
HPart | VPart | GridPart | NestGrids | Mixed |
---|---|---|---|---|
import SwiftUI
import PartitionKit
struct ContentView: View {
var vExample: some View {
VPart(top: {
RoundedRectangle(cornerRadius: 25).foregroundColor(.purple)
}) {
Circle().foregroundColor(.yellow)
}
}
var hExample: some View {
HPart(left: {
RoundedRectangle(cornerRadius: 10).foregroundColor(.blue)
}) {
Circle().foregroundColor(.orange)
}
}
var nestedExample: some View {
VPart(top: {
hExample
}) {
vExample
}
}
var gridExample: some View {
GridPart(topLeft: {
RoundedRectangle(cornerRadius: 25).foregroundColor(.purple)
}, topRight: {
Circle().foregroundColor(.yellow)
}, bottomLeft: {
Circle().foregroundColor(.green)
}) {
RoundedRectangle(cornerRadius: 25).foregroundColor(.blue)
}
}
var nestedGridsExample: some View {
GridPart(topLeft: {
gridExample
}, topRight: {
gridExample
}, bottomLeft: {
gridExample
}) {
gridExample
}
}
var body: some View {
nestedExample
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
List
Style grid collection layout that can be initiated with a list of Identifiable data elements.link |
Stars: 236 |
Last commit: 3 years ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics