Latest 1.0.3
Homepage https://github.com/AndyCuiYTT/SliderViews
License MIT
Platforms ios 8.0, requires ARC
Dependencies SnapKit
Authors

Build Status SliderViews [CRAN]() SliderViews SliderViews

简介

SliderViews 简单易用的滑动标签工具,『标签栏工具』『滑动视图工具』可单独使用.

SliderViews

安装

pod 'SliderViews'

使用示例

SegmentedView 使用

SegmentedView: 标签栏工具,使用需要实现 YTTSegmentedViewDelegate 代理方法.

let segmented = YTTSegmentedView()
segmented.delegate = self // 实现 YTTSegmentedViewDelegate
segmented.addTitleItems(["SliderView1","SliderView2","SliderView3"], isSelected: 1)
segmented.backgroundColor = UIColor.cyan
self.view.addSubview(segmented)
segmented.snp.makeConstraints { (make) in
    make.left.right.centerY.equalToSuperview()
    make.height.equalTo(50)
}

SliderViews

SliderView 使用

SliderView: 滑动视图工具,使用需要实现YTTSliderViewDelegate代理

 let sliderView = YTTSliderView()
 sliderView = self // 实现 YTTSliderViewDelegate
 let view1 = UIView()
 view1.backgroundColor = UIColor.cyan
 let view2 = UIView()
 view2.backgroundColor = UIColor.orange
 let view3 = UIView()
 view3.backgroundColor = UIColor.blue
 sliderView.addChildViews([view1, view2, view3], isSelected: 1)
 self.view.addSubview(sliderView)
 sliderView.snp.makeConstraints { (make) in
     make.edges.equalToSuperview()
 }

SliderViews

TabSliderView 使用

TabSliderView: SegmentedControl 与 SliderView 组合使用.

let tabSliderView = YTTTabSliderView()
tabSliderView.addSubviews([("SliderView1",view1),("SliderView2",view2),("SliderView3",view3)])
view.addSubview(tabSliderView)
tabSliderView.snp.makeConstraints { (make) in
    make.edges.equalToSuperview()
}

SliderViews

反馈

如果您有什么好的修改建议,可以发邮件到[email protected], 也欢迎到我的博客AndyCuiの博客一起讨论学习~

Latest podspec

{
    "name": "SliderViews",
    "version": "1.0.3",
    "summary": "Simple and easy to use tools of slide tab / u7b80u5355u6613u7528u7684u6ed1u52a8u6807u7b7eu680fu5de5u5177.",
    "homepage": "https://github.com/AndyCuiYTT/SliderViews",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "AndyCui": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/AndyCuiYTT/SliderViews.git",
        "tag": "1.0.3"
    },
    "source_files": "Slider/*.swift",
    "requires_arc": true,
    "dependencies": {
        "SnapKit": [
            "~> 4.0.1"
        ]
    }
}

Pin It on Pinterest

Share This