Swiftpack.co - HeshamMegid/HMSegmentedControl as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by HeshamMegid.
HeshamMegid/HMSegmentedControl v1.5.6
A highly customizable drop-in replacement for UISegmentedControl.
⭐️ 4,000
🕓 4 weeks ago
.package(url: "https://github.com/HeshamMegid/HMSegmentedControl.git", from: "v1.5.6")


Pod Version Carthage compatible Pod Platform Pod License

A highly customizable drop-in replacement for UISegmentedControl, used by more than 22,000 apps, including TikTok, PayPal, Imgur and Bleacher Report.


  • 📸 Supports both text and images
  • ↕️ Multiple sizing and selection styles
  • 📜 Horizontal scrolling for an infinite number of segments
  • ⚙️ Advanced title styling with text attributes for font, color, kerning, shadow, etc
  • 🖥 Compatible with both Swift and Objective-C
  • 📱 Updated for Xcode 11, iOS 13 and Swift 5. Supports all the way back to iOS 7!


pod 'HMSegmentedControl'

Installation via Carthage is also supported..


The code below will create a segmented control with the default looks:

let segmentedControl = HMSegmentedControl(sectionTitles: [

segmentedControl.frame = CGRect(x: 0, y: 0, width: 100, height: 40)
segmentedControl.addTarget(self, action: #selector(segmentedControlChangedValue(segmentedControl:)), for: .valueChanged)

Included is a demo project showing how to fully customize HMSegmentedControl.

Possible Styles

Apps Using HMSegmentedControl

If you are using HMSegmentedControl in your app or know of an app that uses it, please add it to this list.

Need Help?

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.



Stars: 4000
Last commit: 4 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

3 years ago

Various bug fixes.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics