欢迎光临
我们一直在努力

SegmentedControl

建站超值云服务器,限时71元/月

SegmentedControl

项目介绍:

https://github.com/IvanVorobei/SegmentedControl

About

Custom SegmentedСontrol for ios on swift. Basic UISegmentedСontrol edit not weak and does not use the scroll, which will be added in this control

自定义SegmentedСontrol ios on swift。增强UISegmentedСontrol的编辑能力和滚动能力。

How use

Create cell:

let cell = SPSegmentedControlCell.init()
cell.label.text = "Avenir"
cell.imageView.image = UIImage.init(named: "imageName")
cell.layout = .textWithImage

Create SegmentedСontrol:

let segmentedСontrol = SPSegmentedControl.init()
segmentedСontrol.add(cell: cell)

and set frame, add as subview

Delegates

SPSegmentedControlCellStyleDelegate use for update state cell when it happen (tap on cell or scroll optional). SPSegmentedControlDelegate you can use for detect position IndicatorView in SegmentedControl for cool animation and UI

SPSegmentedControlCellStyleDelegate用于更新状态单元时发生(点击单元格或滚动)。 SPSegmentedControlDelegate你可以使用在SegmentedControl的检测位置IndicatorView的动画和UI

code4app

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » SegmentedControl
分享到: 更多 (0)