sgp

SGPagingViewSwift

A powerful and easy to use segment control【美团、淘宝、斗鱼、微博、腾讯、网易、今日头条等标题滚动视图】

Showing:

Popularity

Downloads/wk

0

GitHub Stars

80

Maintenance

Last Commit

3yrs ago

Contributors

0

Package

Dependencies

0

License

MIT

Categories

Readme

SGPagingView-Swift

Objective-C Version

结构图

效果图

Installation

  • 下载、拖拽 “SGPagingView-Swift” 文件夹到工程中

代码介绍

SGPagingView 的使用(详细使用, 请参考 Demo)
// SGPageTitleViewConfigure
let configure = SGPageTitleViewConfigure()
// SGPageTitleView
self.pageTitleView = SGPageTitleView(frame: rect, delegate: self, titleNames: titles, configure: configure)
view.addSubview(pageTitleView!)

// SGPageContentScrollView
self.pageContentScrollView = SGPageContentScrollView(frame: contentRect, parentVC: self, childVCs: childVCs)
pageContentScrollView?.delegateScrollView = self
view.addSubview(pageContentScrollView!)
SGPageTitleView 代理方法
func pageTitleView(pageTitleView: SGPageTitleView, index: Int) {
    pageContentScrollView?.setPageContentScrollView(index: index)
}
SGPageContentScrollView 代理方法
func pageContentScrollView(pageContentScrollView: SGPageContentScrollView, progress: CGFloat, originalIndex: Int, targetIndex: Int) {
    pageTitleView?.setPageTitleView(progress: progress, originalIndex: originalIndex, targetIndex: targetIndex)
}

Requirements

  • iOS 9.0 +
  • Xcode 10.0 +(Xcode 9.0 请在 releases 中下载对应版本)

Concluding remarks

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100