From 0b5c220d91810f3186f482537d7d162e7dff5653 Mon Sep 17 00:00:00 2001 From: Alexander Romanov Date: Sat, 15 Jul 2023 19:15:31 +0300 Subject: [PATCH] Fix PageView and Select --- .../OversizeUI/Controls/PageView/PageView.swift | 5 +++-- Sources/OversizeUI/Controls/Select/Select.swift | 14 +++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Sources/OversizeUI/Controls/PageView/PageView.swift b/Sources/OversizeUI/Controls/PageView/PageView.swift index 07b913f..cf370ae 100644 --- a/Sources/OversizeUI/Controls/PageView/PageView.swift +++ b/Sources/OversizeUI/Controls/PageView/PageView.swift @@ -44,10 +44,10 @@ public struct PageView } public var body: some View { - ScrollViewOffset(offset: $offset) { + ScrollViewOffset(offset: $offset, coordinateSpace: .named("Page")) { content } - .frame(maxWidth: .infinity, alignment: .leading) + .frame(maxWidth: .infinity, alignment: .center) .background(background.ignoresSafeArea()) .safeAreaInset(edge: .top) { header } .onChange(of: offset) { offset in @@ -57,6 +57,7 @@ public struct PageView } } } + .coordinateSpace(name: "Page") } @ViewBuilder diff --git a/Sources/OversizeUI/Controls/Select/Select.swift b/Sources/OversizeUI/Controls/Select/Select.swift index 5f35453..4b4180d 100644 --- a/Sources/OversizeUI/Controls/Select/Select.swift +++ b/Sources/OversizeUI/Controls/Select/Select.swift @@ -6,7 +6,7 @@ import SwiftUI // swiftlint:disable all -public struct Select: View +public struct Select: View where Content: View, Actions: View, @@ -80,7 +80,6 @@ public struct Select