A highly customizable drop-in replacement for UISegmentedControl.
Objective-C
4,067
214 commits
updated Mar 26, 2024
A highly customizable drop-in replacement for UISegmentedControl, used by more than 22,000 apps, including TikTok, PayPal, Imgur and Bleacher Report.
pod 'HMSegmentedControl'
Installation via Carthage is also supported..
The code below will create a segmented control with the default looks:
let segmentedControl = HMSegmentedControl(sectionTitles: [
"Trending",
"News",
"Library"
])
segmentedControl.frame = CGRect(x: 0, y: 0, width: 100, height: 40)
segmentedControl.addTarget(self, action: #selector(segmentedControlChangedValue(segmentedControl:)), for: .valueChanged)
view.addSubview(segmentedControl)
Included is a demo project showing how to fully customize HMSegmentedControl.
If you are using HMSegmentedControl in your app or know of an app that uses it, please add it to this list.
If you need help with HMSegmentedControl, or with iOS/Swift development in general, check out swiftmentor.io
HMSegmentedControl is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
If this code was helpful, I would love to hear from you.
2,353 followers · starred Jul 2020
15 followers · starred Jun 2015
319 followers · starred Oct 2015
10 followers · starred Jan 2016
A highly customizable drop-in replacement for UISegmentedControl.
Objective-C
4,067
214 commits
updated Mar 26, 2024
A highly customizable drop-in replacement for UISegmentedControl, used by more than 22,000 apps, including TikTok, PayPal, Imgur and Bleacher Report.
pod 'HMSegmentedControl'
Installation via Carthage is also supported..
The code below will create a segmented control with the default looks:
let segmentedControl = HMSegmentedControl(sectionTitles: [
"Trending",
"News",
"Library"
])
segmentedControl.frame = CGRect(x: 0, y: 0, width: 100, height: 40)
segmentedControl.addTarget(self, action: #selector(segmentedControlChangedValue(segmentedControl:)), for: .valueChanged)
view.addSubview(segmentedControl)
Included is a demo project showing how to fully customize HMSegmentedControl.
If you are using HMSegmentedControl in your app or know of an app that uses it, please add it to this list.
If you need help with HMSegmentedControl, or with iOS/Swift development in general, check out swiftmentor.io
HMSegmentedControl is licensed under the terms of the MIT License. Please see the LICENSE file for full details.
If this code was helpful, I would love to hear from you.
2,353 followers · starred Jul 2020
15 followers · starred Jun 2015
319 followers · starred Oct 2015
10 followers · starred Jan 2016