Skip to content

Coder-ACJHP/UICSegmentedControlView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UICSegmentedControlView

Fully customizable segmented control view component for IOS written with Swift 4, easy to use it's compatible with all kind of iPhone, iPod and iPads regarding home indicator of X device series in protrait and landscape modes.

Screen shots:

Options:

1 - Single swift file, only you need to copy and past it into your project.
2 - You can customize it also from Storyborad

How to use? (implementation)

Usage of UICSegmentedControl is super easy 🎉

  • Download UICSegmentedControl.swift and import them to your project.

For example:

var segmentedControlView: UICSegmentedControlView!

override func viewDidLoad() {
        super.viewDidLoad()
        
        let frame = CGRect(x: 0, y: 100, width: 370, height: 50)
        segmentedControlView = UICSegmentedControlView(frame: frame, titleList: ["BEST VIDEOS","FAVORITES","HISTORY"])
        segmentedControlView.cornerRadiuss = frame.height / 2
        segmentedControlView.selectionBarColor = .white
        segmentedControlView.selectionBarTitleColor = .white
        segmentedControlView.selectionBarTitleFont = UIFont.boldSystemFont(ofSize: 13)
        segmentedControlView.delegate = self
        view.addSubview(segmentedControlView)
    }
    
    // delegate method implement it from 'UICSegmentedControlDelegate'
    func segmentedControlView(_ segmentedControlView: UICSegmentedControlView, didSelectedIndex: Int) {
        self.selectedIndex = didSelectedIndex
    }

Requirements

Xcode 9 or later
iOS 10.0 or later
Swift 4 or later

Licence :

The MIT License (MIT)

About

Fully customizable segmented control view component

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages