Skip to content

PiyushSelarka/MICustomTabBarSwiftUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iOS Custom Tab Bar in SwiftUI

Good news for all our users out there! Now there are no boundaries to your convenience Checkout this super easy custom tabbar integration and example.!!! This is a sample project how to create a custom tab bar in SwiftUI.

Installation

To install it, simply add the following line to your Podfile:

pod 'MICustomTabBar', git: 'https://github.com/PiyushSelarka/MICustomTabBarSwiftUI', branch: 'main'

Then run pod install from the Example directory.

Features

  • Custom tab bar with custom icons and animations
  • Uses SwiftUI's built-in @State and @Binding to manage tab selection

Usage

The custom tab bar is implemented in the pod MICustomTabBar. To use it in your own project, The CustomTabView view and its dependencies into your project, and modify the icons and animations to fit your design.

Customization

    struct ContentView: View {
    
    @State var selectedTab = 0
    var body: some View {
        
        ZStack()
        {
            TabView(selection: $selectedTab) {
                AnyView(Text("Home"))
                    .ignoresSafeArea(.all,edges: .all)
                    .tag(0)
                AnyView(Text("bookmark"))
                    .ignoresSafeArea(.all,edges: .all)
                    .tag(1)
                AnyView(Text("message"))
                    .ignoresSafeArea(.all,edges: .all)
                    .tag(2)
                AnyView(Text("heart"))
                    .ignoresSafeArea(.all,edges: .all)
                    .tag(3)
                AnyView(Text("person"))
                    .ignoresSafeArea(.all,edges: .all)
                    .tag(4)
            }
            .overlay {
                ZStack{
                    CustomTabView(tabsImage: ["house","bookmark","message","heart","person"], selectedTabColor: Color.red, deSelectedTabColor: Color.black, tabBarBackgroundColor: Color.blue, selectedTab: $selectedTab, tabStyle: .one)
                }
            }
        }
    }
}

Requirements

  • iOS 13.0+
  • Xcode 13.0+

📱 Check out other lists of our Mobile UI libraries



💻 Check out other lists of Web libraries



Check out our Work



📄 License

iOS-Top-Tab-Navigation is MIT-licensed.

If you use our open-source libraries in your project, please make sure to credit us and Give a star to www.mindinventory.com

app development