-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
## CLAnimatedTabView | ||
Reusable SwiftUI View with a top tab bar and animated capsule. | ||
Allows the ability to pass in views of the same type displayed as pages, selectable with top tab bar. | ||
|
||
### How to add to a project | ||
Able to be added using [Swift Package Manager](https://developer.apple.com/documentation/xcode/adding-package-dependencies-to-your-app) | ||
|
||
### Example | ||
https://github.com/cjlarsen/CLAnimatedTabView/assets/908625/63c2ac3b-4bb6-4cd7-89b2-e24a10e09f5d | ||
|
||
### Example Implementation | ||
``` | ||
import SwiftUI | ||
import CLAnimatedTabView | ||
struct ContentView: View { | ||
var body: some View { | ||
let viewModel = CLAnimatedTabViewModel(tabBarHeight: 69.0, tabNames: ["Tab 1", "Tab 2", "Tab 3"]) | ||
CLAnimatedTabView(viewModel: viewModel, | ||
Text("1"), | ||
Text("2"), | ||
Text("3") | ||
) | ||
} | ||
} | ||
``` |