A horizontal scroll dial like Instagram.

Related tags

UI HorizontalDial
Overview

HorizontalDial

Swift 5.0 Version License Platform

Preview

Preview gif

Requirements

  • iOS 8.0+
  • Swift 5

Storyboard support

Storyboard Screenshot

Installation

CocoaPods

use_frameworks!
pod "HorizontalDial"

Manually

To install manually the HorizontalDial in an app, just drag the HorizontalDial.swift file into your project.

Properties

Property Type Description
enableRange Bool Use range mode
minimumValue Double Acceptable minimum value
maximumValue Double Acceptable maximum value
value Double Value
tick Double Increase value
centerMarkColor UIColor Set center mark color
centerMarkWidth CGFloat Set center mark width
centerMarkHeightRatio CGFloat Set center mark height
centerMarkRadius CGFloat Set center mark radius
markColor UIColor Set mark color
markWidth CGFloat Set mark width
markRadius CGFloat Set mark radius
markCount Int The number of mark in view
padding Double Vertical offset from bottom in landscape mode
verticalAlign String Vertical Align as top, middle, bottom
lock Bool User input lock

Protocols

Protocol Description
horizontalDialWillBeginScroll(horizontalDial: HorizontalDial) This method is called whenever the HorizontalDial will begin an animated scroll.
horizontalDialDidEndScroll(horizontalDial: HorizontalDial) This method is called whenever the HorizontalDial will ends an animated scroll.
horizontalDialWillValueChanged(horizontalDial: HorizontalDial) This method is called whenever the HorizontalDial will value changed.
horizontalDialDidValueChanged(horizontalDial: HorizontalDial) This method is called whenever the HorizontalDial did value changed.

TODO

  • Code refactoring
  • Optimizing UI performance
  • Add clipsToRange property
  • Add unit property

Donate

If you like this open source, you can sponsor it. 😄

Paypal me

License

The MIT License (MIT)

Copyright (c) 2015 Lee Sun-Hyoup

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

You might also like...
SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!
SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationContoller. Support 3D Touch!

SAHistoryNavigationViewController Support 3D Touch for iOS9!! SAHistoryNavigationViewController realizes iOS task manager like UI in UINavigationConto

Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.
Full configurable spreadsheet view user interfaces for iOS applications. With this framework, you can easily create complex layouts like schedule, gantt chart or timetable as if you are using Excel.

kishikawakatsumi/SpreadsheetView has moved! It is being actively maintained at bannzai/SpreadsheetView. This fork was created when the project was mov

A framework that provides CurtainController. CurtainController is a container view controller that implements a content-curtain interface. You can find a similar implementation in applications like Apple Maps, Find My, Stocks, etc. Someone calls it 🍞 Toast for Swift - Toaster Android-like toast with very simple interface
🍞 Toast for Swift - Toaster Android-like toast with very simple interface

Toaster Android-like toast with very simple interface. (formerly JLToast) Screenshots Features Queueing: Centralized toast center manages the toast qu

🔍 Awesome fully customize search view like Pinterest written in Swift 5.0 + Realm support!
🔍 Awesome fully customize search view like Pinterest written in Swift 5.0 + Realm support!

YNSearch + Realm Support Updates See CHANGELOG for details Intoduction 🔍 Awesome search view, written in Swift 5.0, appears search view like Pinteres

A window arrangement manager for macOS like BetterSnapTool and Magnet
A window arrangement manager for macOS like BetterSnapTool and Magnet

A window arrangement manager for macOS like BetterSnapTool and Magnet. You can split the foremost window to the left half of the screen, the left two-thirds, etc.

A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize.
A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize.

SwiftUI Drawer A SwiftUI bottom-up controller, like in the Maps app. Drag to expand or minimize. Contents Add the Package Basic Usage Examples Credits

Add the Notch on the menubar like the new MacBook Pro.
Add the Notch on the menubar like the new MacBook Pro.

iNotch Add the Notch on the menubar like the new MacBook Pro. Installation This app works on macOS 11.0 or later. Download iNotch.zip from releases pa

Fully customizable Facebook reactions like control
Fully customizable Facebook reactions like control

Reactions is a fully customizable control to give people more ways to share their reaction in a quick and easy way. Requirements • Usage • Installatio

Comments
  • delegate problem

    delegate problem

    Hello! I had issue with delegate. When I tried several methods to assign delegate to another view controller, not that one, which contains HorizontalDial, I had problem: inside VCs delegate is the same object, but inside HorizontalDial object delegate is nil. I tried a lot of fixes in a good way, but helped me only this kludge:

      private var delegateTemp: HorizontalDialDelegate? = nil
        @IBOutlet public weak var delegate: HorizontalDialDelegate? {
            set {
                delegateTemp = newValue
            }
            get {
                return delegateTemp
            }
        }
    

    As you see, I changed delegate from AnyObject? to protocol optional, and have buffer variable delegateTemp. It's not in clean way, but it's works. It's not a big deal, but I bet you can fix it

    opened by iKisliy 1
  • Correct the spelling of CocoaPods in README

    Correct the spelling of CocoaPods in README

    This pull requests corrects the spelling of CocoaPods 🤓 https://github.com/CocoaPods/shared_resources/tree/master/media

    Created with cocoapods-readme.

    opened by ReadmeCritic 0
  • adding spring loaded swipe action?

    adding spring loaded swipe action?

    Can it be possible to add this feature: when swiped, the wheel keeps going for a while based on spring load, snapping to a value, like the wheel of fortune I guess ;-)

    opened by ghost 0
  • Setting minimumValue & maximumValue - Doesn't work

    Setting minimumValue & maximumValue - Doesn't work

    Hi,

    Setting min & max values (in code or Storyborad) doesn't limit the scrolling and/or prevents from getting values out of range set.

    (iOS 9/10, Swift 3, XCode 8.3.2)

    opened by MatanGold 0
Owner
Lee Sun-Hyoup
Lee Sun-Hyoup
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
Medium's upper and lower Menu in Scroll.

Notice: MediumScrollFullScreen is no longer being maintained/updated. MediumScrollFullScreen Medium's upper and lower menu in Scroll. Demo Description

Hiroki Nagasawa 548 Nov 17, 2022
Easy-to-use HStack that snaps to elements on scroll.

SnapToScroll Drop-in SwiftUI-based container view for horizontal snapping. example-video.mp4 Getting Started Using SnapToScroll is straightforward. Th

null 206 Jan 7, 2023
A paging scroll view for SwiftUI, using internal SwiftUI components

PagingView A paging scroll view for SwiftUI, using internal SwiftUI components. This is basically the same as TabView in the paging mode with the inde

Eric Lewis 18 Dec 25, 2022
Paging Library for Infinity Scroll using RxSwift

Paging Library for Infinity Scroll using RxSwift

SubinJang 2 Mar 31, 2022
A page control similar to that used in Instagram

ISPageControl ISPageControl has a page control similar to that used in the Instagram Contents Requirements Installation Usage Communication Credits Li

Interactive 291 Dec 5, 2022
List tree data souce to display hierachical data structures in lists-like way. It's UI agnostic, just like view-model and doesn't depend on UI framework

SwiftListTreeDataSource List tree data souce to display hierachical data structures in lists-like way. It's UI agnostic, just like view-model, so can

Dzmitry Antonenka 26 Nov 26, 2022
A fancy hexagonal layout for displaying data like your Apple Watch

Hexacon is a new way to display content in your app like the Apple Watch SpringBoard Highly inspired by the work of lmmenge. Special thanks to zenly f

Gautier Gédoux 340 Dec 4, 2022
You can dismiss modal viewcontroller like Facebook Messenger by pulling scrollview or navigationbar in Swift.

PullToDismiss PullToDismiss provides dismiss modal viewcontroller function like Facebook Messenger by pulling scrollview or navigationbar with smooth

Suguru Kishimoto 479 Dec 5, 2022
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

WorldDownTown 644 Dec 12, 2022