PagingMenuController
This library is inspired by PageMenu.
Standard mode with flexible item width

Segmented control mode

Infinite mode with fixed item width

Customization
PagingMenuControllerCustomizable
- default page index to show as a first view
- duration for paging view animation
- isScrollEnabled for paging view. Set false in case of using swipe-to-delete on your table view
- background color for paging view
- number of lazy loading pages
- a set of menu controller
- component type of PagingMenuController
MenuViewCustomizable
- background color for menu view
- background color for selected menu item
- height for menu view
- duration for menu view animation
- decelerating rate for menu view
- menu item position
- menu mode and scrolling mode
if centerItem
is true, selected menu item is always on center
if MenuScrollingMode
is ScrollEnabled
or ScrollEnabledAndBouces
, menu view allows scrolling to select any menu item
if MenuScrollingMode
is PagingEnabled
, menu item should be selected one by one
- menu item focus mode
- dummy item view number for Infinite mode
- menu position
- divider image to display right aligned in each menu item
MenuItemViewCustomizable
- horizontal margin for menu item
- menu item mode
Usage
import PagingMenuController
to use PagingMenuController in your file.
Using Storyboard
- You should add
ContainerView
into your view controller's view and setPagingMenuController
as the embedded view controller's class
See PagingMenuControllerDemo
target in demo project for more details
Coding only
See PagingMenuControllerDemo2
target in demo project for more details
Menu move handler (optional)
Moving to a menu tag programmatically
Changing PagingMenuController's option
Call setup
method with new options again.
It creates a new paging menu controller. Do not forget to cleanup properties in child view controller.
Requirements
iOS9+
Swift 3.0+
Xcode 8.0+
v1.4.0 for iOS 8 in Swift 3.0
v1.2.0 for iOS 8 in Swift 2.3
Installation
CocoaPods
PagingMenuController is available through CocoaPods. To install
it, simply add the following line to your Podfile:
Then, run pod install
In case you haven't installed CocoaPods yet, run the following command
Carthage
PagingMenuController is available through Carthage.
To install PagingMenuController into your Xcode project using Carthage, specify it in your Cartfile:
Then, run carthage update --toolchain com.apple.dt.toolchain.Swift_3_0
You can see Carthage/Build/iOS/PagingMenuController.framework
now, so drag and drop it to Linked Frameworks and Libraries
in General menu tab with your project.
Add the following script to New Run Script Phase
in Build Phases menu tab.
Also add the following script in Input Files
In case you haven't installed Carthage yet, download the latest pkg from Carthage
Manual
Copy all the files in Pod/Classes
directory into your project.