catelina777 / FloatingSegmentedControl

Segment control like iOS13 photo app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FloatingSegmentedControl

Provide segment control like iOS13 photo app

This library makes this repository easy to use πŸ‘€

[FloatingSwitch]https://github.com/usagimaru/FloatingSwitch

light dark

Installation πŸš€

Carthage

github "catelina777/FloatingSegmentedControl"

Usage

  1. Install a custom view on Interface Builder.
  2. Important: Assign the custom view class as FloatingSegmentedControl like this.
  3. Set an appropriate layouts. In the default implementation of FloatingSegment, the width follows the intrinsic size.
  4. Set segments with setSegments (with:) method.
  5. Set target and action with addTarget method. Then you can catch control events when users switch segments.

See ViewController.swift for usage.

About

Segment control like iOS13 photo app

License:MIT License


Languages

Language:Swift 93.1%Language:Ruby 3.5%Language:Objective-C 3.4%