All Projects → kingsic → Pagingviewkit

kingsic / Pagingviewkit

Licence: mit
A powerful and easy to use segment view 【QQ、淘宝、微博、腾讯、网易新闻、今日头条等标题滚动视图】

Programming Languages

swift
15916 projects

PagingViewKit

Objc 版本

结构图

PagingTitleViewConfigure(PagingTitleView 初始化配置信息)

PagingTitleView(用于与 PagingContent 联动)

PagingContentScrollView(内部由 UIScrollView 实现)

PagingContentCollectionView(内部由 UICollectionView 实现)

效果图

Installation

  • CocoaPods 导入 pod 'PagingViewKit', '~> 1.1.5'

代码介绍

  • 初始化方法
let configure: PagingTitleViewConfigure = PagingTitleViewConfigure()
// PagingTitle
let pagingTitleView = PagingTitleView(frame: frame, titles: titles, delegate: self, configure: configure)
view.addSubview(pagingTitleView)

// PagingContent
let pagingContent: PagingContentScrollView = PagingContentScrollView(frame: frame, parentVC: self, childVCs: childVCs)
pagingContent.delegate = self
view.addSubview(pagingContent)
  • PagingTitleView 代理方法
func pagingTitleView(pagingTitleView: PagingTitleView, index: Int) {
    pagingContentView.setPagingContentScrollView(index: index)
}
  • PagingContentScrollView 代理方法
func pagingContentScrollView(pagingContentScrollView: PagingContentScrollView, progress: CGFloat, currentIndex: Int, targetIndex: Int) {
    pagingTitleView.setPagingTitleView(progress: progress, currentIndex: currentIndex, targetIndex: targetIndex)
}

Requirements

  • iOS 10.0 +
  • Swift 5.0 +

Concluding remarks

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].