
Swift 2017-01-31 23:33
Swift 自定义分段控件 SegmentedControl
回复:0 查看:5929 感兴趣:142 赞:2
Swift 自定义 iOS 分段控件 SegmentedControl 。
使用方法:
Create cell:
let cell = SPSegmentedControlCell.init() cell.label.text = "Avenir" cell.imageView.image = UIImage.init(named: "imageName") cell.layout = .textWithImageCreate SegmentedСontrol:
let segmentedСontrol = SPSegmentedControl.init() segmentedСontrol.add(cell: cell)and set frame, add as subview.