Your SwiftUI custom slider is crap. Here's mine, which is also crap, but it's my crap

Overview

Fuck your custom slider

It doesn't work. Sure, it looks great, with gradients, and multiple thumbs, but really, it's useless. No more paying for a subscription on Medium only to find out yet again that your slider doesn't work for me. No more fumbling around with Xcode, trying to get it to create package dependencies (and holy shit, package dependencies? A whole package for a customizable slider that doesn't do anything special, it just looks cool? 🤦‍♂️ ).

Fuck my custom slider

drawing

It looks like crap, the code is crap, I barely understand SwiftUI, so the design and implementation are crap too. But it does do the things I wanted it to do, which your custom slider doesn't do, even after I did finally get Xcode to do the whole package dependency thing.

drawing

  • Tickmarks
  • Thumb snaps to tickmarks
  • Resting thumb resists moving until you pull on it a bit
  • Tap the track to move the thumb there instantly--will snap if close to a tickmark
  • Double-tap the floating text to enter a value from the keyboard

drawing

How to use 😆

  • Clone.
  • Select the macOS build. I don't yet have my Hogwarts Certificate for the Black Magic of iOS
  • Run
  • Barf/mock/curse the author

Just copy the files to your project; be sure to get the Primitives folder, which has some of my crusty old standby helper utilities n stuff

Bonus Material!

Have a look at Shared/DragState.swift to see a drag-n-drop state machine implemented using GKStateMachine from Apple's GameplayKit. SwiftUI is still slapping me around, but after all these years I've managed to learn some of Apple's tools 🤦‍♂️

You might also like...
Quotes App is quotes browsing app which is built with Quotable Free API completely in SwiftUI.
Quotes App is quotes browsing app which is built with Quotable Free API completely in SwiftUI.

Quotes App is quotes browsing app which is built with Quotable Free API completely in SwiftUI. You can watch the whole journey of building this

A simple todo app which aims to demonstrate some new concepts from SwiftUI 3
A simple todo app which aims to demonstrate some new concepts from SwiftUI 3

TodoAppSwiftUI3 A simple todo app which aims to demonstrate some new concepts from SwiftUI 3 Description This is a simple todo app built to demonstrat

A simple and lightweight Swift package which provides a SwiftUI view for interactive geo coordinates input!
A simple and lightweight Swift package which provides a SwiftUI view for interactive geo coordinates input!

LocationPicker for SwiftUI LocationPicker for SwiftUI is a very simple and lightweight Swift package which provides you a SwiftUI view for interactive

A SwiftUI component which handles logging in with Apple to Firebase
A SwiftUI component which handles logging in with Apple to Firebase

Login with Apple Firebase SwiftUI I made this SwiftUI component to handle logging in with Apple to Firebase. Demo Gif Usage in SwiftUI struct ContentV

SwiftUI & Combine app using MovieDB API. With a custom Flux (Redux) implementation.
SwiftUI & Combine app using MovieDB API. With a custom Flux (Redux) implementation.

MovieSwiftUI MovieSwiftUI is an application that uses the MovieDB API and is built with SwiftUI. It demos some SwiftUI (& Combine) concepts. The goal

An example of creating custom popups in SwiftUI
An example of creating custom popups in SwiftUI

Custom Popup Example An example project for Implementing custom popups in SwiftUI article. Author Artem Novichkov, [email protected] License The

INTUZ is presenting an interesting a custom alert view in SwiftUI
INTUZ is presenting an interesting a custom alert view in SwiftUI

Introduction INTUZ is presenting an interesting a custom alert view in SwiftUI, App Control to integrate inside your native iOS-based application. Cus

A set of SwiftUI custom modifiers to make the ScrollView snappable.
A set of SwiftUI custom modifiers to make the ScrollView snappable.

Snappable A set of SwiftUI custom modifiers to make the ScrollView snappable. The goal of this library is to provide an easy way to implement Views su

SwiftUI Backports - Introducing a collection of SwiftUI backports to make your iOS development easier

SwiftUI Backports Introducing a collection of SwiftUI backports to make your iOS development easier. Many backports support iOS 13+ but where UIKIt fe

Owner
Rob Bishop
Rob Bishop
In this mini app covered the concepts like basics of SwiftUI and Navigations and Animations and List with CRUD functions and MVVM and App Launch and App icons adding and also applied persistence using UserDefaults Concept.

TodoList In this application used the concepts from the beginner level project of SwiftUI_Evolve_1 The following concepts covered in this mini app Swi

Sivaram Yadav 2 Dec 4, 2021
Shows a Pokémon list with its image and name with SwiftUI

TelepassDigitalTestIB Description General This project aims to develop an app, for Telepass interview process, that shows a Pokémon list with its imag

null 1 Jul 5, 2022
A Meetings app where the user is presented with the number of meetings created , join any them , edit the varied details also keeping the track of the history of the meetings.

Meetings A Meetings app where the user is presented with the number of meetings created , join any them , edit the varied details also keeping the tra

Devang Papinwar 1 Oct 18, 2021
EzNews - A simple and easy to use News app for iOS and iPadOS. It uses NewsAPI as its backend

EzNews This was my first proper Swift app. Its a news app made for iOS and iPadO

Arnav Singhal 4 Apr 30, 2022
A simple, but powerful UI patcher for macOS Big Sur designed for everyone.

What is Patched Sur? Patched Sur is a UI patcher for macOS Big Sur, designed to make it easy to run macOS 11 on unsupported Macs. This patcher hopes t

Ben 274 Dec 24, 2022
WeatherApp - this is weather app based on AppBrewery code from bootcamp (but upgraded)

WeatherApp What was created Based on App Brewery code I've made a beautiful, dark-mode enabled weather app. It's possible to check the weather for the

Ewelina Mijal 0 Dec 30, 2021
This app is a native client for openHAB which allows easy access to your sitemaps

openHAB client for iOS Introduction This app is a native client for openHAB which allows easy access to your sitemaps. Beta releases are available on

openHAB 176 Dec 30, 2022
Visualize your dividend growth. DivRise tracks dividend prices of your stocks, gives you in-depth information about dividend paying stocks like the next dividend date and allows you to log your monthly dividend income.

DivRise DivRise is an iOS app written in Pure SwiftUI that tracks dividend prices of your stocks, gives you in-depth information about dividend paying

Kevin Li 78 Oct 17, 2022
An example to-do list app using SwiftUI which is introduced in WWDC19

SwiftUITodo SwiftUITodo is an example to-do list application using SwiftUI which is first introduced in WWDC19 keynote. Requirements Xcode 11 Beta Swi

Suyeol Jeon 701 Dec 23, 2022