KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
RefreshableScrollView
★ 13
Open GitHub ↗
No description available.
Download README (.md)
Explore Similar Repositories
typora-latex
:
A LaTeX-style theme for Typora. Supports Chinese characters on Windows and macOS.
tutorial_telemetry
:
A Haskell Tutorial about parsing Satellite Telemetry
NumPytorch
:
A numpy based python package with pytorch-like interface for training a Convolution Neural Network.
coredns-acme
:
CoreDNS plugin to use ACME for getting your TLS/SSL certs
GIWIFI-demo-Login
:
模拟giwifi登录验证,python,golang
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
RefreshableScrollView
?
Download (.md)
# RefreshableScrollView to add "Pull to refresh" as modifier for ScrollView in SwiftUI. SwiftUI is very new when it comes to completion like UIKit. Apple has forgotten to include simple idea like "Pull to refresh" in UIScrollView . This Swift package is for your to make it up for your ✌🏻😅.  You can add the package to your project file -> Swift Package -> Add Package Dependcy : ```swift .package(url: "https://github.com/TariqAlmazyad/RefreshableScrollView.git") ``` ***Please note that it is recommanded to place it as last modifier for ScrollView, otherwise , you will have some unexpected errors .** ```swift import SwiftUI import RefreshableScrollView struct ContentView: View { @State private (set) var primaryColor = .white var body: some View { ScrollView(.vertical, showsIndicators: false, content: { LazyVGrid(columns: [ GridItem(.adaptive(minimum: 100, maximum: 200)), ]) { ForEach(0..<100) { num in Text("\(num)") .font(.system(size: 24, weight: .light, design: .rounded)) .foregroundColor(.white) .padding() .overlay(Circle().stroke(Color.white, lineWidth: 0.2)) } }.padding(.top, 26) }).background(primaryColor.ignoresSafeArea()) // recommanded to place it as last modifier for ScrollView .onRefresh(spinningColor: .white, text: "Pull to refresh", textColor: .white, backgroundColor: primaryColor) { refreshControl in DispatchQueue.main.asyncAfter(deadline: .now() + 2) { refreshControl.endRefreshing() } } } } ```