Swiftpack.co -  devs-flux/FDPageView as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
devs-flux/FDPageView
Custom PageView in SwiftUI
.package(url: "https://github.com/devs-flux/FDPageView.git", from: "1.0.1")

FDPageView

A custom pageview which support in all swift ui version

We have 2 types of pageview

1.Default

2.Change UnSelected image

How to use

1.Default

FDPageView(currentTab: $currentTab, 
           style: Style(pages: 3, width: 16, height: 16, selectedItemImage: "yourImageName", 
           unSelectedItemImage: "yourImageName", selectedItemColor: Color.red, unSelectedItemColor:Color.blue),
           viewHeight: 32)

ezgif com-gif-maker

2.Change UnSelected image

FDPageView(currentTab: $currentTab, 
           style: Style(pages: 3, width: 16, height: 16, selectedItemImage: "yourSelectedImageName", 
           unSelectedItemImage: "yourUnSelectedImageName", selectedItemColor: Color.red, unSelectedItemColor:Color.blue),
           viewHeight: 32)

ezgif com-gif-maker (1)

Example

import SwiftUI
import FDPageView

struct ContentView: View {
    @State var currentTab = 0
    var body: some View {
        VStack(content: {
            TabView(selection: $currentTab,
                    content:  {
                        PageView(title: "Title\(currentTab + 1)", subtitle: "Subtile\(currentTab + 1)")
                            .tag(0)
                        PageView(title: "Title\(currentTab + 1)", subtitle: "Subtile\(currentTab + 1)")
                            .tag(1)
                        PageView(title: "Title\(currentTab + 1)", subtitle: "Subtile\(currentTab + 1)")
                            .tag(2)   
                    })
                .tabViewStyle(PageTabViewStyle())
            FDPageView(currentTab: $currentTab, style: Style(pages: 3, width: 16, height: 16, 
                       selectedItemImage: "Circle", unSelectedItemImage: "Circle", selectedItemColor: Color.red, unSelectedItemColor: Color.blue),
                       viewHeight: 32)  
        })
    }
}

GitHub

link
Stars: 0
Last commit: 5 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.

Release Notes

initial version
5 weeks ago

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