diff --git a/ExampleProject/ExampleProject.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ExampleProject/ExampleProject.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 4e5fa90..ebd36a6 100644 --- a/ExampleProject/ExampleProject.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ExampleProject/ExampleProject.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -16,7 +16,7 @@ "location" : "https://github.com/sentryco/SplitViewKit", "state" : { "branch" : "main", - "revision" : "c949d6cafb85c2fa288a3d3a3ca8177c9a13e0c5" + "revision" : "5cea6fd943e8f9dcc70902091bf856070c2abae2" } } ], diff --git a/Sources/SplitViewKit/SplitViewContainer+Content.swift b/Sources/SplitViewKit/SplitViewContainer+Content.swift index f691da0..68581fb 100644 --- a/Sources/SplitViewKit/SplitViewContainer+Content.swift +++ b/Sources/SplitViewKit/SplitViewContainer+Content.swift @@ -57,24 +57,24 @@ extension SplitViewContainer { geometryChange( // isLandscape: , //sizeClass: sizeClass.reBind, - geometry: geometry, - closure: navigationSplitView + geometry: geometry +// closure: navigationSplitView ) } } - func geometryChange(/*isLandscape: Bool, */geometry: GeometryProxy, closure: (_ winWidth: CGFloat) -> some View) -> some View { + func geometryChange(/*isLandscape: Bool, */geometry: GeometryProxy /*closure: (_ winWidth: CGFloat) -> some View*/) -> some View { if isLandscape { // - Fixme: ⚠️️ Add doc if sizeClass == .compact { // this fixes things going into compact. but not 70% to regular - closure(geometry.size.width) // ⚠️️ This is the same as the other, but it refreshes the view, and recalculates columnwidths etc, which is what we need + navigationSplitView(geometry.size.width) // ⚠️️ This is the same as the other, but it refreshes the view, and recalculates columnwidths etc, which is what we need } else { // if sizeClass == .regular if isNarrow(isLandscape: isLandscape, winWidth: geometry.size.width) { - closure(geometry.size.width) // ⚠️️ This is the same as the other, but it refreshes the view, and recalculates columnwidths etc, which is what we need + navigationSplitView(geometry.size.width) // ⚠️️ This is the same as the other, but it refreshes the view, and recalculates columnwidths etc, which is what we need } else { - closure(geometry.size.width) // ⚠️️ This is the same as the other, but it refreshes the view, and recalculates columnwidths etc, which is what we need + navigationSplitView(geometry.size.width) // ⚠️️ This is the same as the other, but it refreshes the view, and recalculates columnwidths etc, which is what we need } } } else { - closure(geometry.size.width) // ⚠️️ We can't load the same variable, or else it will not refresh. so we reference it again like this to referesh. seems strange but it is what it is, there might be another solution to this stange behaviour, more exploration could be ideal + navigationSplitView(geometry.size.width) // ⚠️️ We can't load the same variable, or else it will not refresh. so we reference it again like this to referesh. seems strange but it is what it is, there might be another solution to this stange behaviour, more exploration could be ideal } } /**