Skip to content

Instantly share code, notes, and snippets.

@tkashkin
tkashkin / PullToRefreshView.swift
Last active March 26, 2023 14:43
SwiftUI Pull to refresh view
import SwiftUI
struct PullToRefreshView: View
{
private static let minRefreshTimeInterval = TimeInterval(0.2)
private static let triggerHeight = CGFloat(100)
private static let indicatorHeight = CGFloat(100)
private static let fullHeight = triggerHeight + indicatorHeight
let backgroundColor: Color