Swiftpack.co - stateman92/PagingTabView as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by stateman92.
stateman92/PagingTabView 0.0.5
It seems that Apple's TabView took some steroids! 💊
⭐️ 2
🕓 1 year ago
iOS
.package(url: "https://github.com/stateman92/PagingTabView.git", from: "0.0.5")

PagingTabView

It seems that Apple's TabView took some steroids! 💊

Setup

Add the following to Package.swift:

.package(url: "https://github.com/stateman92/PagingTabView", exact: .init(0, 0, 5))

Or add the package in Xcode.

Usage

@ObservedObject private var viewModel: PagingTabViewViewModel
// ...
VStack {
    SegmentedControl(items: ["Gray", "Green", "Red", "Blue", "Brown"], selectedSegmentIndex: $viewModel.segmentIndex)
    PagingTabView(offset: $viewModel.offset, index: $viewModel.index, viewSize: viewSize, horizontal: horizontal) {
        ForEach(0...4, id: \.self) { index in
            Image(systemName: "circle")
                .resizable()
                .aspectRatio(contentMode: .fit)
                .foregroundColor(.red)
        }
    }
}

For details see the Example app.

Example

Example

GitHub

link
Stars: 2
Last commit: 25 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

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