How to make Pure SwiftUI pull to refresh?

Pull down to refresh data in SwiftUI — Xcode 12-iOS 14

ForEach(0..<8) { tick in
VStack {
Rectangle()
.fill(Color(UIColor.tertiaryLabel))
.opacity(
(Int((geo.frame(in: coordinateSpace).midY)/7) < tick)
? 0 : 1) //show bar based on how much view been pulled down
.frame(width: 3, height: 7)
.cornerRadius(3)
Spacer()
}.rotationEffect(Angle.degrees(Double(tick)/(8) * 360))
}.frame(width: 20, height: 20, alignment: .center)

iOS Developer | Swift | Flutter

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store