# iPages **Repository Path**: BugMonkey/iPages ## Basic Information - **Project Name**: iPages - **Description**: No description available - **Primary Language**: Swift - **License**: Not specified - **Default Branch**: Updated-ReadMe - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2022-02-11 - **Last Updated**: 2022-02-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README

iPagesπŸ“–

Quickly implement swipable page views in iOS. πŸ“

Get Started | Examples | Customize | Install | Usage

CI


## Get Started drawing 1. [Install](https://github.com/benjaminsage/iPages/blob/main/INSTALL.md) `iPages` 2. Add `iPages` to your project ```swift import SwiftUI import iPages struct ContentView: View { @State var currentPage: Int = 0 var body: some View { iPages(currentPage: $currentPage) { Text("iPages") Color.pink } } } ``` 3. Customize your `iPages` ## Examples ### Marketing Materials Use `iGraphicsView` to demo marketing slides. ```swift import SwiftUI import iPages import iGraphics struct ContentView: View { @State var currentPage: Int = 0 var body: some View { iPages(currentPage: $currentPage) { iGraphicsView(.first) iGraphicsView(.second) iGraphicsView(.third) } } } ``` ### Shopping App Hide the bottom dots & add infinite scroll to remove context. ```swift import SwiftUI import iPages import iGraphics struct ContentView: View { @State var currentPage: Int = 0 var body: some View { iPages(currentPage: $currentPage) { iGraphicsBox(.photo) .stack(3) iGraphicsBox(.card) .stack(2) } .hideDots(true) .wrapsInfinitely(true) } } ``` ## Customize `iPages` has two required parameters: 1️⃣ a state variable to track the current page, and 2️⃣ a trailing view builder of ordered views. `iPages` supports a variety of custom modifiers. All customizations are built into our modifiers. **Example**: Change the dot colors, enable infinite wrap & hide dots for single page views with the following code block: ```swift iPages($currentPage) { EmptyView() } .dotsTintColors(currentPage: Color, otherPages: Color) .wrapsInfinitely(true) .dotsHideForSinglePage(true) ``` Use our exhaustive input list to customize your views. Modifier | Description --- | --- `.hideDots(hideDots: Bool) -> iPages` | Modifies whether or not the page view should include the standard page control dots. (β€’β€’β€’β€’) `.wraps(wraps: Bool) -> iPages` | Modifies whether or not the page view should restart at the beginning πŸ” when swiping past the end (and vise-versa) `.dotsHideForSinglePage(hide: Bool) -> iPages` | Modifies whether the page dots are hidden when there is only one page. 1️⃣‡️ `.dotsTintColors(currentPage: Color, otherPages: Color) -> iPages` | Modifies tint colors πŸŸ‘πŸŸ’πŸ”΄πŸŸ£ to be used for the page dots. `.dotsBackgroundStyle(style: UIPageControl.BackgroundStyle) -> iPages` | Modifies the background style βšͺοΈπŸ”˜ of the page dots. `.dotsAllowContinuousInteraction(allowContinuousInteraction: Bool) -> iPages` | Modifies the continuous interaction settings of the dots. πŸ”„ `.dotsAlignment(_ alignment: Alignment) -> iPages` | Modifies the **alignment of the page dots**. πŸ‘† πŸ‘‡ `.navigationOrientation(_ orientation: UIPageViewController.NavigationOrientation) -> iPages` | Modifies the navigation **orientation** of the page view. ↔️ ↕️ `.disableBounce(_ disable: Bool) -> iPages` | Disables the **bounce** settings of the page view. This is especially useful for scroll views. `.interPageSpacing(_ spacing: CGFloat) -> iPages` | Modifies the spacing between the pages. ↔️ ## Install Use the Swift package manager to install. Find instructions [here](https://github.com/benjaminsage/iPages/blob/main/INSTALL.md)πŸ˜€ ## Usage iPages is distributed under a GNU GPL open-source license. This license allows iPages to ALWAYS remain FREE for individuals. However, this license is often incompatible for many commercial applications. If your app is distributed for commercial use, it could violate this open-source license even "if the application is free in the App Store". In order to offer iPages safely to our commercial friends we made it easy to purchase a lifetime, full-use license for $4.99. Code on worry free 😁