From 05f0d194c8dd095d40525043c2410d31d2864d60 Mon Sep 17 00:00:00 2001 From: Chris Larsen Date: Sun, 5 May 2024 16:04:31 -0500 Subject: [PATCH] Create README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..3c85c31 --- /dev/null +++ b/README.md @@ -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") + ) + } +} +```