Custom ArrangmentViewStyle
Building a custom ArrangementViewStyle in SwiftUI with a slot for compact layouts + onGeometryChange for orientation:
View C compact size classes
Stack secondary + primary vertically in portrait
Fall back to .split otherwise
#SwiftUI #iOSDev #iphoneDuo
4
491
Testing ArrangementView(.split) + .splitArrangementLayoutRatio(idealHorizontal: 0.5, idealVertical: 0.4) in SwiftUI.
#SwiftUI #BuildInPublic
2
7
354
Need to adapt your layout when a TabView sidebar is available?
Read @Environment(\.isTabViewSidebarAvailable) inside any child view of your TabView
it automatically tells you whether the sidebar is supported/active in the current context.
7
400













