https://github.com/coder-acjhp/uicsegmentedcontrolview
Fully customizable segmented control view component
https://github.com/coder-acjhp/uicsegmentedcontrolview
custom-view ios-swift segmented-control swift
Last synced: 4 months ago
JSON representation
Fully customizable segmented control view component
- Host: GitHub
- URL: https://github.com/coder-acjhp/uicsegmentedcontrolview
- Owner: Coder-ACJHP
- License: mit
- Created: 2019-04-13T13:42:38.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-04-13T13:52:18.000Z (over 6 years ago)
- Last Synced: 2024-11-08T00:35:58.278Z (about 1 year ago)
- Topics: custom-view, ios-swift, segmented-control, swift
- Language: Swift
- Size: 2.38 MB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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)