PolioPager
PolioPager is the easiest way to use PagerTabStrip including search tab in iOS. Written in pure swift.
Preview & Comparison
SNKRS
↓↓↓↓
PolioPager enables us to use PagerTabStrip like SNKRS.
Installation
CocoaPods
You can use CocoaPods to install PolioPager
by adding it to your Podfile
:
To get the full benefits, import PolioPager
Carthage
Create a Cartfile
that lists the framework and run carthage update
. Follow the instructions to add $(SRCROOT)/Carthage/Build/iOS/PolioPager.framework
to an iOS project.
github "YuigaWada/PolioPager"
Manually
- Download and drop
PolioPager
in your project. - Congratulations!
Usage example
Usage
PolioPager is very simple.
First, you have to create a view controller that extends PolioPagerViewController
You need at least tabItems()
and viewControllers()
.
Tab Items
You only have to prepare TabItem Structure and override tabItems()
.
Widths of each tab are automatically calculated.
ViewControllers
Override viewControllers()
.
In the above example, ViewControllers are prepared from storyboard.
For those who don't know instantiateViewController
, check below.
↓
TabItem structure
TabItem is defined as follow.
Search ViewController
To get input on TextFiled in Search ViewController, you have to adopt PolioPagerSearchTabDelegate
protocol.
For example,
Customization
Color & Frame
Check this.
Duration
You can also get these Components!
For Example, if you want to change the appearance of selectedBar,
More
If you want to change the visible child view controller, use moveTo(index: Int)