正如其名,CJSegmentController 是一个带有 segmentControl 的 UIViewController,当此 SegmentControl 的子视图有不同的 Bar button Item 时,您会遇到很多麻烦。这个 pod 是为了这个问题而创建的。
要运行示例项目,首先克隆仓库,然后在 Example 目录中运行 pod install
。
- (instancetype)initWithViewControllers:(NSArray *)viewControllers TintColor:(UIColor *)tintColor;
UIViewController+BarButtonItem
,并像 Demo 中的 TestVCTwo
一样通过子 ViewController 管理您的引擎按钮。CJSegmentController 可以通过 CocoaPods 获取。要安装它,只需将以下行添加到您的 Podfile 中
pod "CJSegmentController"
CJSegmentController 在 MIT 许可下可用。有关更多信息,请参阅 LICENSE 文件。