- Notifications
You must be signed in to change notification settings - Fork1
DHSegmentedControl is drop in replacement of the UISegementedControl. Why you need it? If you have lots of segments, UISegmentedControl breaks the UI.
License
NotificationsYou must be signed in to change notification settings
hudinwal/DHSegmentedControl
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
To run the example project, clone the repo, and runpod install from the Example directory first.
DHSegmentedControl is available throughCocoaPods. To installit, simply add the following line to your Podfile:
pod"DHSegmentedControl"
// In appropriate function, maybe viewDidLoad(), we create the segmentsvarsegments=[DHSemgentTitleContainable]() segments.append(DHSegmentTitle("ALL")) segments.append(DHSegmentTitle("EAT")) segments.append(DHSegmentTitle("DRINK")) segments.append(DHSegmentTitle("DESSERT")) segments.append(DHSegmentTitle("EVENTS")) segments.append(DHSegmentTitle("SITES")) // With these segments we then create a Segmented ControlletscrollabelSegmentControl=DHSegmentedControl(items: segments) //Later on set the frames of the control scrollabelSegmentControl.frame= segmentsContainer.bounds; scrollabelSegmentControl.autoresizingMask=[.flexibleLeftMargin,.flexibleRightMargin,.flexibleWidth] scrollabelSegmentControl.addTarget(self, action: #selector(segmentControlValueChanged(segmentControl:)), for:.valueChanged) // In the end add the control to the viewself.segmentsContainer.addSubview(scrollabelSegmentControl)
d_hudinwal,dinesh_hudinwal@hotmail.com
DHSegmentedControl is available under the MIT license. See the LICENSE file for more info.
About
DHSegmentedControl is drop in replacement of the UISegementedControl. Why you need it? If you have lots of segments, UISegmentedControl breaks the UI.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
