Swiftpack.co - darrarski/swiftui-tabs-view as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by darrarski.
darrarski/swiftui-tabs-view v0.4.0
SwiftUI tabbed interface. Customizable replacement for `SwiftUI.TabView`.
⭐️ 0
🕓 3 days ago
iOS macOS
.package(url: "https://github.com/darrarski/swiftui-tabs-view.git", from: "v0.4.0")

SwiftUI Tabs View

Swift 5.5 platform iOS 15 | macOS 12.1

SwiftUI tabbed interface. Customizable replacement for SwiftUI.TabView.

iOS macOS
Example iOS app light modeExample iOS app dark mode Example macOS app light modeExample macOS app dark mode
  • Build with vanilla SwiftUI (no external dependencies).
  • Replaces SwiftUI.TabView.
  • Allows wide customization.
  • Supports light and dark mode.
  • Tabbar hides below the keyboard, like with vanilla SwiftUI.TabView.

▶️ Usage

Add as a dependecy to your project using Swift Package Manager.

Embed in your SwiftUI view:

import SwiftUITabsView

struct ContentView: View {
  var body: some View {
    TabsView(
      tabs: /* [Tab]  */,
      selectedTab: /* Binding<Tab> */,
      barPosition: /* ToolbarPosition */,
      ignoresKeyboard: /* Bool */,
      frameChangeAnimation: /* Animation? */,
      tabsBar: /* @ViewBuilder @escaping ([Tab], Binding<Tab>) -> TabsBar */,
      content: /* @ViewBuilder @escaping (Tab) -> TabContent */
    )
  }
}

Check out documentation comments and the included example app.

🛠 Development

Open SwiftUITabsView.xcworkspace in Xcode (≥13.1) for development.

Use ExampleApp-iOS scheme to build and run the iOS example application.

Use ExampleApp-macOS scheme to build and run the macOS example application.

☕️ Do you like the project?

Buy Me A Coffee

Consider supporting further development and buy me a coffee.

 

📄 License

Copyright © 2022 Dariusz Rybicki Darrarski

License: MIT

GitHub

link
Stars: 0
Last commit: 3 days ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

v0.4.0 - Top & bottom tabs bar support
3 days ago

What's Changed

Full Changelog: https://github.com/darrarski/swiftui-tabs-view/compare/v0.3.0...v0.4.0

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics