File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# FloatingSegmentedControl
22Provide segment control like iOS13 photo app
3+
4+ <p align =" center " >
5+ <img src="https://img.shields.io/badge/Swift-5.0-orange.svg">
6+ <img src="https://img.shields.io/badge/platforms-ios-black.svg">
7+ <img src="https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat" href="https://github.com/Carthage/Carthage">
8+ </p >
9+
10+ ## This library makes this repository easy to use 👀
11+ [ FloatingSwitch] https://github.com/usagimaru/FloatingSwitch
12+
13+ 1 | 2
14+ :-------------------------:|:-------------------------:
15+ ![ ] ( Images/light-mode_example.png ) | ![ ] ( Images/dark-mode_example.png )
16+
17+
18+ # Installation 🚀
19+
20+ # Usage
21+ 1 . Install a custom view on Interface Builder.
22+ 2 . Assign the custom view class as ` FloatingSegmentedControl ` .
23+ 3 . Set an appropriate layouts. In the default implementation of FloatingSegment, the width follows the intrinsic size.
24+ 4 . Set segments with ` setSegments (with:) ` method.
25+ 5 . Set ` target ` and ` action ` with addTarget method. Then you can catch control events when users switch segments.
26+
27+ See ` ViewController.swift ` for usage.
You can’t perform that action at this time.
0 commit comments