Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/HeshamMegid/HMSegmentedControl
A highly customizable drop-in replacement for UISegmentedControl.
https://github.com/HeshamMegid/HMSegmentedControl
hmsegmentedcontrol ios objective-c
Last synced: 7 days ago
JSON representation
A highly customizable drop-in replacement for UISegmentedControl.
- Host: GitHub
- URL: https://github.com/HeshamMegid/HMSegmentedControl
- Owner: HeshamMegid
- License: other
- Created: 2012-12-25T12:01:10.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T02:26:56.000Z (9 months ago)
- Last Synced: 2024-10-29T15:00:18.444Z (about 1 month ago)
- Topics: hmsegmentedcontrol, ios, objective-c
- Language: Objective-C
- Homepage:
- Size: 1.15 MB
- Stars: 4,013
- Watchers: 103
- Forks: 834
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-ios - HMSegmentedControl - A drop-in replacement for UISegmentedControl mimicking the style of the segmented control used in Google Currents and various other Google products. (UI / Segmented Control)
- awesome-ios-star - HMSegmentedControl - A drop-in replacement for UISegmentedControl mimicking the style of the segmented control used in Google Currents and various other Google products. (UI / Segmented Control)
- awesome - HMSegmentedControl - A highly customizable drop-in replacement for UISegmentedControl. (objective-c)
- awesome - HMSegmentedControl - A highly customizable drop-in replacement for UISegmentedControl. (hmsegmentedcontrol)
- awesome - HMSegmentedControl - A highly customizable drop-in replacement for UISegmentedControl. (iOS / PageView)
- awesome - HMSegmentedControl - A highly customizable drop-in replacement for UISegmentedControl. (iOS / PageView)
README
HMSegmentedControl
===[![Pod Version](http://img.shields.io/cocoapods/v/HMSegmentedControl.svg?style=flat)](http://cocoadocs.org/docsets/HMSegmentedControl)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
[![Pod Platform](http://img.shields.io/cocoapods/p/HMSegmentedControl.svg?style=flat)](http://cocoadocs.org/docsets/HMSegmentedControl)
[![Pod License](http://img.shields.io/cocoapods/l/HMSegmentedControl.svg?style=flat)](http://opensource.org/licenses/MIT)A highly customizable drop-in replacement for UISegmentedControl, used by more than 22,000 apps, including TikTok, PayPal, Imgur and Bleacher Report.
# Features
- 📸 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!# Installation
```
pod 'HMSegmentedControl'
```Installation via Carthage is also supported..
# Usage
The code below will create a segmented control with the default looks:
```swift
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.
# 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](https://github.com/HeshamMegid/HMSegmentedControl/wiki/Apps-using-HMSegmentedControl).
# Need Help?
If you need help with HMSegmentedControl, or with iOS/Swift development in general, check out [swiftmentor.io](https://swiftmentor.io)# License
HMSegmentedControl is licensed under the terms of the MIT License. Please see the [LICENSE](LICENSE.md) file for full details.
If this code was helpful, I would love to hear from you.
[@HeshamMegid](http://twitter.com/HeshamMegid)
[http://hesh.am](http://hesh.am)