Swift51.com
Swift 头像
Swift  2017-01-31 23:33

Swift 自定义分段控件 SegmentedControl

回复:0  查看:5698  感兴趣:139  赞:2  

Swift 自定义 iOS 分段控件 SegmentedControl 。

Swift 自定义分段控件 SegmentedControl

使用方法:

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.


相关开源代码