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.
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.
- Custom tab bar with custom icons and animations
- Uses SwiftUI's built-in
@State
and@Binding
to manage tab selection
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.
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)
}
}
}
}
}
- iOS 13.0+
- Xcode 13.0+
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