HQPagerViewController
https://github.com/quangpc/HQPagerViewController
This control combines the great menu view with a UIPageviewController that takes care of showing the right page when clicking on the menu view and updating the selection when the UIPageviewController scrolls。
此控件将好用的菜单视图与UIPageviewController结合,开题报告,在UIPageviewController滚动时,它将单击菜单视图并更新选择时显示正确的页面。
Screenshots 截图Installation 安装方法CocoapodsInstall with Cocoapods by adding the following to your Podfile:
platform :ios, '9.0' pod 'HQPagerViewController', :git=> 'https://github.com/quangpc/HQPagerViewController.git', :branch=> 'master'ManuallyCopy HQPagerViewController.swift & HQPagerMenuView.swift to your project.
Usage 使用方法Basically we just need to provide the list of child view controllers to show and these view controllers should provide the information for conform HQPagerViewControllerDataSource.
Check sample project to see how it works.
基本上,我们只需要提供子视图控制器的列表来显示,这些视图控制器应该提供符合HQPagerViewControllerDataSource的信息。
查看示例项目以了解其工作原理。
Connect outlets and add layout constrainsWe strongly recommend to use IB to set up our page controller views.
Drag into the storyboard a UIViewController and set up its class with your pager controller (HQPagerViewController). Drag a UIView into your view controller view and connect to containerView outlet. Drag a UIView into your view controller view and set class to HQPagerMenuView then connect to outlet menuView
Setup data source for child controller为子控制器设置数据源
Provide HQPagerMenuViewItemProvider for each child controller
为每个子控制器提供HQPagerMenuViewItemProvider
iOS 9 and above
,开题报告