A TabView that can be animated in a versatile way! 🪛
Add the following to Package.swift
:
.package(url: "https://github.com/stateman92/AnimatedTabView", exact: .init(0, 0, 3))
extension Tab {
static var house: Self {
.init(rawValue: "house")
}
static var bookmark: Self {
.init(rawValue: "bookmark")
}
static var message: Self {
.init(rawValue: "message")
}
static var person: Self {
.init(rawValue: "person")
}
}
// ...
@State private var selectedTab: Tab = .house
// ...
AnimatedTabView(
selectedTab: $selectedTab,
tabs: [.house, .bookmark, .message, .person],
backgroundColor: { _ in .white },
foregroundColor: { _ in .black }
)
For details see the Example app.
link |
Stars: 2 |
Last commit: 7 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics