Description
Mimicrate to native UIPageViewController. Each page is new controller, it can be even navigation controller. You can add any class of controllers like child. Support parent layout margins, paging and scroll by index.
You can scroll to any page programatically. If you need pages for onboarding, you can disable scroll by gester and disable swipe to dismiss.
SPPageController alternatives and similar libraries
Based on the "UI" category.
Alternatively, view SPPageController alternatives based on common mentions on social networks and blogs.
-
Animated Tab Bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
Pagemenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
Alerts Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
ESTabBarController
:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie! -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
Material Components for iOS
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
Scrollable-GraphView
An adaptive scrollable graph view for iOS to visualise simple discrete datasets. Written in Swift. -
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
ActiveLabel
UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift -
SlideMenuControllerSwift
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift. -
PopupDialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style. -
TLYShyNavBar
DISCONTINUED. Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars! -
StarWars.iOS
This component implements transition animation to crumble view-controller into tiny pieces. -
KMNavigationBarTransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically. -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
CircleMenu
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion -
RazzleDazzle
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros. -
PaperOnboarding
:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion
InfluxDB - Power Real-Time Data Analytics at Scale
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SPPageController or a related project?
README
SPPageController
Mimicrate to native UIPageViewController
. Each page is new controller, it can be even navigation controller. You can add any class of controllers like child. Support parent layout margins, paging and scroll by index.
You can scroll to any page programatically. If you need pages for onboarding, you can disable scroll by gester and disable swipe to dismiss.
Navigate
Installation
Ready for use on iOS 12+.
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.
Once you have your Swift package set up, adding as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/ivanvorobei/SPPageController", .upToNextMajor(from: "1.3.0"))
]
CocoaPods:
CocoaPods is a dependency manager. For usage and installation instructions, visit their website. To integrate using CocoaPods, specify it in your Podfile
:
pod 'SPPageController'
Manually
If you prefer not to use any of dependency managers, you can integrate manually. Put Sources/SPPageController
folder in your Xcode project. Make sure to enable Copy items if needed
and Create groups
.
Usage
SPPageController
is container controller. Now available 2 system of paging - .scroll
and .page
. First using UICollectionView
like basic view, its good work with content offset but not perfect when device rotated. Second using native UIPageViewController
. You shoud choose which better for you.
Pass child controllers which using like pages and simple present page controller as you need:
// Here your controllers
let controllers: [UIViewController] = []
let pageController = SPPageController(childControllers: controllers, system: .page)
present(pageController, animated: true, completion: nil)
You can manage layout margins of container. Apple still has bug with it, but my way support it correctly:
pageController.view.layoutMargins = .init(horizontal: 50, vertical: 0)
// Don't forget enable preserve layout margins for childs:
// childController.view.preservesSuperviewLayoutMargins = true
Now for all childs left and right margins will be +50pt.
Scroll
If you want scroll only programatically, disable scroll between pages by gester:
pageController.allowScroll = false
For scroll by index call this function:
pageController.safeScrollTo(index: 3, animated: true)
Dismiss
If need disable dismiss by gester (related for modal controllers), set flag to false
:
pageController.allowDismissWithGester = false
Russian Community
Я веду телеграм-канал, там публикую новости и туториалы. С проблемой помогут в чате.
Видео-туториалы выклыдываю на YouTube: