WizardViewController
Source code of realization page scrolling using UIPageViewController as base class, with configuration and predefined enum cases of each page
Install / Use
/learn @dimpiax/WizardViewControllerREADME
WizardViewController
Description
Build your tutorial / description / informative screens by trivial approach. Setup visual assets and be flexible with page delegation. Put special views or controls on top subview, which is not scrolling.
<img src=thumbnail.png width=25% height=25% />Example
_wizardVC = WizardViewController()
_wizardVC.modalTransitionStyle = .coverVertical
_wizardVC.modalPresentationStyle = .overCurrentContext
// setup page indicators
_wizardVC.pageIndicatorColors = {[unowned self] currentPageIndex in
let value: UIColor
if let color = self._wizardVC.getView(index: currentPageIndex)?.backgroundColor {
var r: CGFloat = 0, g: CGFloat = 0, b: CGFloat = 0, a: CGFloat = 0
color.getRed(&r, green: &g, blue: &b, alpha: &a)
// inverse color
value = UIColor(red: 1-r, green: 1-g, blue: 1-b, alpha: 1)
}
else {
switch currentPageIndex {
case 1: value = .darkGray
case 2: value = .gray
default: value = .black
}
}
return (nil, value)
}
// set views
_wizardVC.setViews([B(), B(), B()])
// or
// set view controllers
_wizardVC.setViewControllers([A(), A(), A(), A()])
// set custom view on top subview
let button = UIButton(type: .custom)
button.setTitle("skip", for: .normal)
button.sizeToFit()
button.frame.origin.y = view.bounds.height - button.bounds.height - 50
button.frame.size.width = view.bounds.width
button.addTarget(self, action: #selector(closeTutorial), for: .touchUpInside)
_wizardVC.setTop(view: button)
Installation
WizardViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "WizardViewController"
Author
Pilipenko Dima, dimpiax@gmail.com
License
WizardViewController is available under the MIT license. See the LICENSE file for more info.
Related Skills
node-connect
332.3kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
81.7kCreate 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
332.3kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
81.7kCommit, push, and open a PR
