GithubHelp home page GithubHelp logo

moriya-taichi / hmsegmentedcontrol Goto Github PK

View Code? Open in Web Editor NEW

This project forked from heshammegid/hmsegmentedcontrol

0.0 1.0 0.0 1.18 MB

A highly customizable drop-in replacement for UISegmentedControl.

License: Other

Ruby 0.90% Objective-C 96.42% Swift 2.68%

hmsegmentedcontrol's Introduction

HMSegmentedControl

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.





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:

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.

Need Help?

If you need help with HMSegmentedControl, or with iOS/Swift development in general, check out swiftmentor.io

License

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.

@HeshamMegid
http://hesh.am

hmsegmentedcontrol's People

Contributors

abelcapable avatar alexandreos avatar crazytonyli avatar gaijin03 avatar goncharik avatar hanishabsigh avatar heshammegid avatar hilalbaig avatar hons82 avatar huynguyencong avatar ikesyo avatar jacksonpan avatar jmkr avatar leontiy avatar lordzsolt avatar maxep avatar miglius avatar mpurland avatar mrtristan avatar nirvana-icy avatar raxityo avatar rbbtsn0w avatar sergey-sportsetter avatar taehongkimkr avatar timbao avatar valeriomazzeo avatar valeriyvan avatar volodg avatar waynett avatar xxycode avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.