Multiple UI adaptable vertical segments slider

Overview

SSVerticalSegmentsSlider

It's a vertical segment slider developed in SwiftUI. It offers many properties to create different UI that fit your needs. We've listed down all properties and usage explanations below.


     


NOTE:

  • Using this library in the UIKit project may not work as expected. Currently, we are working on its support.
  • Kindly don't specify the height and width of this control while integrating. It will auto calculate its size based on its internal subviews.

Requirements

  • iOS 14.0+
  • Swift 5.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

If you are unable to find SSVerticalSegmentsSlider, please make sure to update your cocoa pods to have the latest updates of all libraries.

To integrate SSVerticalSegmentsSlider into your Xcode project using CocoaPods, specify it in your Podfile:

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'SSSegmentsSliderExample' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for SSSegmentsSliderExample
  
  pod 'SSVerticalSegmentsSlider'
end

Then, run the following command:

$ pod install

Swift Package Manager Install

Version: 1.0.1

dependencies: [
    .package(url: "https://github.com/smartSenseSolutions/SSVerticalSegmentsSlider.git", .upToNextMajor(from: "1.0.1"))
]

Carthage

  • We are working on it :)

Usage

You can download the Example project from this library to see its workaround. Project consists above three different UIs, and SSVerticalSegmentsSlider implementation in ScrollView & TableView.

struct ContentViewStraightSectionedView: View {
    @State var selectedProgress: Int = 2
    
    var body: some View {
        SSVerticalSegmentsSlider(
            selectedProgress: self.$selectedProgress,
            layoutOption: .straight(80),
            heightOfSegments: 40,
            gapBetweenSegments: 2,
            cornerRadiusForAllSegments: 0.0,
            cornerRadiusForFirstAndLastSegmentCornersOnly: 20)
        .onChange(of: selectedProgress) { newValue in
            print("Progress changed to \(selectedProgress)!")
        }
        .cornerRadius(12)
    }
}

Properties

selectedProgress:

struct ContentViewStraightSectionedView: View {
    @State var selectedProgress: Int = 2
    
    var body: some View {
        SSVerticalSegmentsSlider(
                selectedProgress: self.$selectedProgress)
    }
}

This property references the progress value. Use this property to track the progress. You can also pass the default progress value as mentioned in the above example. Use @ObservedObject when you have a custom type you want to use that might have multiple properties and methods, or might be shared across multiple views.

layoutOption:

It has three options to layout your view accordingly.

  • invertedTriangle(CGFloat, Int)
  • triangle(CGFloat, Int)
  • straight(CGFloat)
struct ContentViewStraightSectionedView: View {   
    @State var selectedProgress: Int = 2

    var body: some View {
          SSVerticalSegmentsSlider(
            selectedProgress: self.$selectedProgress,
            layoutOption: .straight(80))
    }
}

  

Other Properties:

These other properties will help you to configure this control based on your use case. We also would like to know about new use-cases or ideas from you that can fit in this control to fulfill your needs & others.

License

SSVerticalSegmentsSlider is released under the MIT license. See LICENSE for details.

You might also like...
UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizontal.
UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizontal.

MultiSlider UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizo

iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing
iOS camera engine with Vine-like tap to record, animatable filters, slow motion, segments editing

SCRecorder A Vine/Instagram like audio/video recorder and filter framework in Objective-C. In short, here is a short list of the cool things you can d

A scroll pager that displays a list of tabs (segments) and manages paging between given views
A scroll pager that displays a list of tabs (segments) and manages paging between given views

ScrollPager A scroll pager similar to the one in Flipboard. The control creates a tabbar given a title or an image, and has the option of connecting t

PhotoSlider is a simple photo slider and can delete slider with swiping.
PhotoSlider is a simple photo slider and can delete slider with swiping.

PhotoSlider is a simple photo slider and can delete slider with swiping.

A custom reusable slider control with 2 thumbs (range slider).
A custom reusable slider control with 2 thumbs (range slider).

MARKRangeSlider A custom reusable slider control with 2 thumbs (range slider). Values range is between minimumValue and maximumValue (from 0 to 1 by d

BMPlayer - A video player for iOS, based on AVPlayer, support the horizontal, vertical screen
BMPlayer - A video player for iOS, based on AVPlayer, support the horizontal, vertical screen

A video player for iOS, based on AVPlayer, support the horizontal, vertical screen. support adjust volume, brightness and seek by slide, support subtitles.

Swipe between pages with an interactive title navigation control. Configure horizontal or vertical chains for unlimited pages amount.
Swipe between pages with an interactive title navigation control. Configure horizontal or vertical chains for unlimited pages amount.

SlideController is a simple and flexible UI component fully written in Swift. Built using power of generic types, it is a nice alternative to UIPageVi

TomatoVerticalMenuMania lets you create a vertical, scrollable menu to the left of the screen.
TomatoVerticalMenuMania lets you create a vertical, scrollable menu to the left of the screen.

TomatoVerticalMenuMania Framework Development and compatibility Development platform: iOS Language: Swift Compatibility: iOS 13 or greater Description

A structured vertical/horizontal stack layout
A structured vertical/horizontal stack layout

EEStackLayout A vertical stackview which takes subviews with different widths and adds them to it's rows with paddings, spacings etc. Installation Coc

Swipe between pages with an interactive title navigation control. Configure horizontal or vertical chains for unlimited pages amount.
Swipe between pages with an interactive title navigation control. Configure horizontal or vertical chains for unlimited pages amount.

SlideController is a simple and flexible UI component fully written in Swift. Built using power of generic types, it is a nice alternative to UIPageVi

HoverConversion realized vertical paging with UITableView. UIViewController will be paged when reaching top or bottom of UITableView contentOffset.
HoverConversion realized vertical paging with UITableView. UIViewController will be paged when reaching top or bottom of UITableView contentOffset.

HoverConversion ManiacDev.com referred. https://maniacdev.com/2016/09/hoverconversion-a-swift-ui-component-for-navigating-between-multiple-table-views

Useful for showing text or custom view tags in a vertical or horizontal scrollable view and support Autolayout at the same time
Useful for showing text or custom view tags in a vertical or horizontal scrollable view and support Autolayout at the same time

Useful for showing text or custom view tags in a vertical or horizontal scrollable view and support Autolayout at the same time. It is highly customizable that most features of the text tag can be configured.

Horizontal and Vertical collection view for infinite scrolling that was designed to be used in SwiftUI
Horizontal and Vertical collection view for infinite scrolling that was designed to be used in SwiftUI

InfiniteScroller Example struct ContentView: View { @State var selected: Int = 1 var body: some View { InfiniteScroller(direction: .ve

VerticalTabView is a native way to display paged vertical content in SwiftUI.

VerticalTabView 🔝 VTabView is a native way to display paged vertical content in SwiftUI. To work it makes use of the new iOS 14 TabView PageTabViewSt

ListViewSwiftUI - A project for creating a vertical list using the Swift UI.This project include topic,ListView to show list of movies,Tabbar A simple yet customizable horizontal and vertical picker view
A simple yet customizable horizontal and vertical picker view

WheelPicker A simple yet customizable horizontal and vertical picker view Features Vertical or Horizontal picker Image or Text data Configure UILabel

:octocat:💧 A slider widget with a popup bubble displaying the precise value selected. Swift UI library made by @Ramotion
:octocat:💧 A slider widget with a popup bubble displaying the precise value selected. Swift UI library made by @Ramotion

FLUID SLIDER A slider widget with a popup bubble displaying the precise value selected written on Swift. We specialize in the designing and coding of

A custom reusable circular / progress slider control for iOS application.
A custom reusable circular / progress slider control for iOS application.

HGCircularSlider Example To run the example project, clone the repo, and run pod install from the Example directory first. You also may like HGPlaceho

RangeSeedSlider provides a customizable range slider like a UISlider.
RangeSeedSlider provides a customizable range slider like a UISlider.

RangeSeekSlider Overview RangeSeekSlider provides a customizable range slider like a UISlider. This library is based on TomThorpe/TTRangeSlider (Objec

Releases(1.0.1)
Owner
smartSense Solutions
We are working to build community through open source.
smartSense Solutions
Horizontal and Vertical collection view for infinite scrolling that was designed to be used in SwiftUI

InfiniteScroller Example struct ContentView: View { @State var selected: Int = 1 var body: some View { InfiniteScroller(direction: .ve

Serhii Reznichenko 5 Apr 17, 2022
Server Driven UI can enable faster iterations and allowing apps to instantly update on multiple platforms.

Pets App Server Driven UI can enable faster iterations and allowing apps to instantly update on multiple platforms Steps to run Pets-Web: Download or

Metin Atalay 0 Jun 11, 2022
Library that makes it easy to create multiple environments within a single app. You can switch environments without deleting the application.

AppContainer Library that makes it easy to create multiple environments within a single app. You can switch environments without deleting the applicat

null 8 Dec 15, 2022
A custom layout built on top of SwiftUI's Layout API that lays elements out in multiple lines. Similar to flex-wrap in CSS, CollectionViewFlowLayout.

WrapLayout A custom layout built on top of SwiftUI's Layout API that lays elements out in multiple lines. Similar to flex-wrap in CSS, CollectionViewF

Hiroshi Kimura 6 Sep 27, 2022
UISegmentedControl remake that supports selecting multiple segments, vertical stacking, combining text and images.

MultiSelectSegmentedControl UISegmentedControl remake that supports selecting multiple segments, vertical stacking, combining text and images. Feature

Yonat Sharon 286 Dec 15, 2022
UISegmentedControl remake that supports selecting multiple segments, vertical stacking, combining text and images.

MultiSelectSegmentedControl UISegmentedControl remake that supports selecting multiple segments, vertical stacking, combining text and images. Feature

Yonat Sharon 286 Dec 15, 2022
VerticalSlider is a vertical slider control for iOS in Swift.

?? VerticalSlider If you like VerticalSlider, give it a ★ at the top right of this page. Overview VerticalSlider is a vertical implementation of the U

Jon Kent 78 Sep 15, 2022
VerticalSlider - An animatable and customizable vertical slider written in Swift 4

VerticalSlider An animatable and customizable vertical slider written in Swift 4. Quick Start VerticalSliderPlayground Clone Repo Open VSVerticalSlide

Vincent Smithers 13 Apr 26, 2022
UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizontal.

MultiSlider UISlider clone with multiple thumbs and values, range highlight, optional snap intervals, optional value labels, either vertical or horizo

Yonat Sharon 326 Dec 29, 2022
Easily add vertical and horizontal pull to refresh to any UIScrollView. Can also add multiple pull-to-refesh views at once.

This is a fork from the famous SVPullToRefresh pod with 2 additional functionalities: Can add multiple pull-to-refresh views into one single UIScrollV

Hoang Tran 42 Dec 28, 2022