Skip to content

the page slides sideways with an uneven jittering effect when embedding the TwitterView into the TabView  #131

@ibeizhu

Description

@ibeizhu

Describe the bug
Referring to the official example, the page slides sideways with an uneven jittering effect when embedding the TwitterView into the TabView

To Reproduce
Below code to reproduce the behavior:

import SwiftUI
import PagerTabStripView

struct ContentView: View {
    @State private var selection: Tab = .home
    enum Tab {
        case home
        case my
        case square
    }
    var body: some View {
        TabView(selection: $selection) {
            TwitterView()
                .tabItem {
                    Label("Home", systemImage: "house.fill")
                }
                .tag(Tab.home)
            TwitterView()
                .tabItem {
                    Label("Find", systemImage: "dot.circle.viewfinder")
                }
                .tag(Tab.square)
            TwitterView()
                .tabItem {
                    Label("My", systemImage: "person.crop.circle")
                }
                .tag(Tab.my)
        }
    }
}

Expected behavior
Expect smooth horizontal sliding Tabs

Versions (please complete the following information):

  • Xcode: [e.g. Xcode 14.3.1]
  • Device: [e.g. iPhone14]
  • OS: [e.g. iOS13.4]
  • Library version [e.g. 4.0.0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions