Skip to content

wxxsw/TabBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TabBar

codebeat badge


Installation

Swift Package Manager

  1. Select Xcode -> File -> Swift Packages -> Add Package Dependency...
  2. Enter https://github.com/wxxsw/TabBar.
  3. Click Next, then select the version, complete.

Requirements

  • iOS 13+
  • Xcode 11+
  • Swift 5+

Quick Start

struct ContentView : View {
    @State private var selection: Int = 0
    
    var body: some View {
        NavigationView {
            TabBar(selection: $selection) {
                HomeView()
                    .tabBarItem(0) { Image("chat") }
                ContactView()
                    .tabBarItem(1) { Image("contact") }
                DiscoverView()
                    .tabBarItem(2) { Image("discover") }
                MeView()
                    .tabBarItem(3) { Image("me") }
            }
        }
    }
}

Demo

Open TabBar.xcodeproj and run Demo target.

License

TabBar is released under the MIT license. See LICENSE for details.

About

🚥 TabBar for SwiftUI - Make custom TabView possible

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages