文章来源:淘论文网   发布者: 毕业设计   浏览量: 32



还可以点击去查询以下关键词:
[Swift]    [毕业]    [PagerViewController]    [【Swift】HQ毕业PagerViewController]   

项目介绍:

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 安装方法Cocoapods

Install with Cocoapods by adding the following to your Podfile:

platform :ios, '9.0' pod 'HQPagerViewController', :git=> 'https://github.com/quangpc/HQPagerViewController.git', :branch=> 'master'Manually

Copy 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 constrains

We 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

extension SampleViewController: HQPagerViewControllerDataSource { func menuViewItemOf(inPager pagerViewController: HQPagerViewController) -> HQPagerMenuViewItemProvider { let item = HQPagerMenuViewItemProvider(title: titles[index], normalImage: normalIcons[index], selectedImage: highlightedIcons[index], selectedBackgroundColor: colors[index]) return item } }Customization 自定义方法Change title Font 改变titile字体menuView.titleFont = UIFont.boldSystemFont(ofSize: 14)Change title text color 改变titile字体颜色menuView.titleTextColor = UIColor.blackChange selected viewcontroller 改变选中的控制器setSelectedIndex(index: 1, animated: false)Requirements 环境需求

iOS 9 and above

开题报告


这里还有:


还可以点击去查询:
[Swift]    [毕业]    [PagerViewController]    [【Swift】HQ毕业PagerViewController]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/8674.docx
  • 上一篇:【Swift】KYFloatingActionButton
  • 下一篇:资源查询型软毕业设计件 macOS OSX magnet