PageControl
A simple way to navigate between pages by using gestures
Install / Use
/learn @policante/PageControlREADME
PageControl
A simple way to navigate between pages by using gestures

Example
To run the example project, clone the repo, and run pod install from the Example directory first.
Requirements
- iOS 8.3 or higher
Installation
PageControl is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'PageControl'
Usage
In your storyboard, add a container view of the type PageControlViewController

self.pageController.delegate = self
self.pageController.dataSource = self
extension ViewController: PageControlDelegate {
func pageControl(_ pageController: PageControlViewController, atSelected viewController: UIViewController) {
(viewController as! CardItemViewController).animateImage()
}
func pageControl(_ pageController: PageControlViewController, atUnselected viewController: UIViewController) {
}
}
extension ViewController: PageControlDataSource {
func numberOfCells(in pageController: PageControlViewController) -> Int {
return self.dataController.count
}
func pageControl(_ pageController: PageControlViewController, cellAtRow row: Int) -> UIViewController! {
return self.dataController[row]
}
func pageControl(_ pageController: PageControlViewController, sizeAtRow row: Int) -> CGSize {
let width = pageController.view.bounds.size.width - 20
if row == pageController.currentPosition {
return CGSize(width: width, height: 500)
}
return CGSize(width: width, height: 500)
}
}
If you need to change the page manually, use:
self.pageController.currentPosition = index
self.pageController.nextPage()
self.pageController.previousPage()
Author
Rodrigo Martins, policante.martins@gmail.com
License
PageControl is available under the MIT license. See the LICENSE file for more info.
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
