skip to Main Content

On iOS 16.3 the ScrollView component can enable paging by setting the following:

UIScrollView.appearance().isPagingEnabled = true

However, after updating to iOS 16.4, this no longer enables paging on the ScrollView. Are there any workarounds to make this solution work? or are there alternative ways to build vertical paging in SwiftUI? I’m familiar with workarounds using TabView but I cannot use that in this project for other reasons.

2

Answers


  1. Try to use CollectionView wrapper.
    you can follow this link already implemented.

    Login or Signup to reply.
  2. Horizontal/Vertical paging in iOS 17

    From iOS 17, you don’t need to tweak the UIKit appearance. All you need to do is applying the following modifier on the ScrollView:

    .scrollTargetBehavior(.paging)
    

    This works on both horizontal and vertical scrollViews

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search