A special control that provides one or more buttons in a single view for selecting between different screens, views, or modes in your app.
To run the example project, clone the repo, and run pod install
from the Example directory first.
A special control that provides one or more buttons in a single view for selecting between different screens, views, or modes in your app.
AYSegmentControl is available through CocoaPods. To install it, simply add the following line to your Podfile:
inhibit_all_warnings!
target 'YOUR-TARGET-NAME' do
use_frameworks!
pod 'AYSegmentControl'
end
// 'segmentControl' - object of class 'AYSegmentControl' (control).
// 'titles' - object of class '[String]' (titles list).
segmentControl.segmentTitles = titles
segmentControl.isSelectionIndicatorHidden = false
segmentControl.selectedTextColor = .darkText
segmentControl.textColor = .lightGray
segmentControl.lineColor = .purple
segmentControl.lineHeight = 2
segmentControl.lineCornerRadius = segmentControl.lineHeight / 2
segmentControl.select(segment: 0, with: false)
Anton Yereshchenko
AYSegmentControl is available under the MIT license. See the LICENSE file for more info.