SwiftUI view enabling navigation between pages of content, imitating the behaviour of UIPageViewController for iOS and watchOS
Pull request #24 by @ezefranca
PageScrollState
is @StateObject
instead of @ObservableObject
, which prevents memory leaksSome of changes/features here are based on work of @gregcotten in #13
Changed framework's bundle identifier, which caused inability to run apps on device when using Carthage (https://github.com/Carthage/Carthage/issues/2559#issuecomment-539665460)
New features:
selectedPage
BindingpageSwitchThreshold
parameter, which control distance that needs to be scrolled, to qualify as page switchFixed issue with PageControlTheme init being internal.
Fixed issue with PageControlTheme.offset
not being used.
API changes:
PageControlTheme.offset
-> xOffset
for vertical mode & yOffset
for horizontal modeFixed issue with gesture precedence (#2), causing button tap to be recognized before DragGesture
Performance improvement by removing AnyView/Group components causing scrolling not being smooth on slower devices like Apple Watch.
HPageView
and VPageView
according to chosen scroll directionAdded ability to control alignment of PageControl component inside PageView.