目录
目录README.md

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

关于
2.6 MB
邀请码