Skip to content

Commit c7de20d

Browse files
author
RYUHEI KAMINISHI
committed
➕ Add documents
1 parent faef883 commit c7de20d

3 files changed

Lines changed: 25 additions & 0 deletions

File tree

Images/dark-mode_example.png

727 KB
Loading

Images/light-mode_example.png

746 KB
Loading

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,27 @@
11
# FloatingSegmentedControl
22
Provide 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.

0 commit comments

Comments
 (0)