Skip to content

TabStriper is a library that switches screens by selecting a tab or swiping the screen Built with SwiftUI

License

Notifications You must be signed in to change notification settings

giiiita/TabStriper

Repository files navigation

TabStriper

TabStriper is a library that switches screens by selecting a tab or swiping the screen Built with SwiftUI

Platforms License: MIT

Usage

struct ColorView: View {
    let color: Color
    var body: some View {
        self.color
    }
}

struct ContentView: View {
    
    let colorViews: [StripView] = [
        StripView(id: 1, title: "green", view: AnyView(ColorView(color: .green))),
        StripView(id: 2, title: "blue", view: AnyView(ColorView(color: .blue)))
    ]
    
    var body: some View {
        TabStriper(stripViews: self.colorViews)
            .barColor(.red)
            .titleColor(.gray)
            .selectedTitleColor(.black)
    }
}

Installation

TabStriper is available via Swift Package Manager.

Using Xcode 11, go to File -> Swift Packages -> Add Package Dependency and enter https://github.com/giiiita/TabStriper.git

About

TabStriper is a library that switches screens by selecting a tab or swiping the screen Built with SwiftUI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages