Skip to content

Instantly share code, notes, and snippets.

View Kirill12a's full-sized avatar
🙏

Kirill Kirill12a

🙏
View GitHub Profile
@Kirill12a
Kirill12a / RemindeTimePickerView.swift
Created December 13, 2023 18:52
Custom slider for changing time on a time scale (hours, days, weeks, months, year)
import SwiftUI
enum SliderConstants {
static let sliderHeight: CGFloat = 60
static let horizontalPadding: CGFloat = 10
static let trackHeight: CGFloat = 8
static let largeThumbSize: CGFloat = 24
static let regularThumbSize: CGFloat = 16
static let keyIntervalThreshold: CGFloat = 4
static let labelOffsetY: CGFloat = -30