CocoaPods trunk is moving to be read-only. Read more on the blog, there are 18 months to go.

XZSegmentedControl 10.5.0

XZSegmentedControl 10.5.0

Maintained by Xezun, Xezun.



  • By
  • Xezun

XZSegmentedControl

CI Status Version License Platform

基于 UICollectionView 设计的分段控件,主要用于横向或纵向的菜单视图。

let control = XZSegmentedControl.init(frame: CGRect(x: 0, y: 0, width: 375, height: 50), direction: .horizontal)
self.view.addSubview(control)

control.titles = ["标题一", "标题二"]
control.titleColor = .black
control.selectedTitleColor = .red

control.addTarget(self, action: #selector(segmentedControlValueChanged(_:)), for: .valueChanged)

Example

To run the example project, clone the repo, and run pod install from the Pods directory first.

Requirements

iOS 11.0, Xcode 14.0

Installation

XZSegmentedControl is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'XZSegmentedControl'

功能特性

Author

Xezun, [email protected]

License

XZSegmentedControl is available under the MIT license. See the LICENSE file for more info.