MXSegmentedControl
MXSegmentedControl 是一个受 Segmentio 和 HMSegmentedPager 启发的 iOS 分段控件。MXSegmentedControl 容易集成,非常灵活。它能够动态计算分段宽度以适应或填充内容,也可以跟踪 UIScrollView 的内容偏移以改变段落。
安装
MXSegmentedControl 可以通过 CocoaPods 获得。要安装它,只需将以下行添加到您的 Podfile 中。
pod 'MXSegmentedControl'
用法
- 您可以配置一个简单的分段控件,如下所示。
segmentedControl.append(title: "First")
segmentedControl.append(title: "Second")
segmentedControl.append(title: "Third")
作者
许可证
MXSegmentedControl 在 MIT 许可证下可用。有关更多信息,请参阅 LICENSE 文件。