Replacement of UIRefreshControl, and more functions.

Overview

ScrollEdgeControl

Replacement of UIRefreshControl, and more functions.

Overview

ScrollEdgeControl is a UI component that is similar to UIRefreshControl. but it pulls up to the even further abstracted component.

ScrollEdgeControl can attach to every edge in a scroll view. For instance, pulling to down, up, left, right to trigger something activity such as refreshing. (pull-to-activate)

It supports also disabling pull-to-activate, it would be useful in case of displaying as a loading indicator at bottom of the list.

Showcase

Vertical

Top Bottom

Horizontal

Left Bottom

More patterns

pull to refresh and additional loadings

Installation

Cocoapods

Including custom activity indicator

pod "ScrollEdgeControl"

If you need only core component

pod "ScrollEdgeControl/Core"

SwiftPM

dependencies: [
    .package(url: "https://github.com/muukii/ScrollEdgeControl.git", exact: "<VERSION>")
]

How to use

Setting up

let scrollEdgeControl = ScrollEdgeControl(
  edge: .top, // ✅ a target edge to add this control
  configuration: .init(),  // ✅ customizing behavior of this control
  activityIndicatorView: ScrollEdgeActivityIndicatorView(color: .black) // ✅ Adding your own component to display on this control
)
let scrollableView: UIScrollView // ✅ could be `UIScrollView`, `UITableView`, `UICollectionView`

scrollableView.addSubview(scrollEdgeControl) // ✅ Could add multiple controls for each edge

Handling

scrollEdgeControl.handlers.onDidActivate = { instance in

  ...

  // after activity completed
  instance.setActivityState(.inactive, animated: true)
}

Behind the scenes

WIP

Why uses Advance in dependency

Advance helps animation in the scroll view.

It is a library to run animations with fully computable values using CADisplayLink.

UIScrollView's animations are not in CoreAnimation.
Those are computed in CPU every frame. that's why we can handle it in the UIScrollView delegate.
We can update content offset with UIView animation, but sometimes it's going to be weird animation.
To solve it, using CADisplayLink, update values for each frame.

Refs:

Author

License

MIT

You might also like...
A drop-in replacement for UILabel that supports attributes, data detectors, links, and more

TTTAttributedLabel A drop-in replacement for UILabel that supports attributes, data detectors, links, and more TTTAttributedLabel is a drop-in replace

🍴 Parallelize two or more async functions

Fork Parallelize two or more async functions What is Fork? Fork allows for a single input to create two separate async functions that return potential

UIViewController drop in replacement with much more customisation
UIViewController drop in replacement with much more customisation

PopupViewController UIAlertController drop in replacement with much more customization You can literally replace UIAlertController by PopupViewControl

UICollectionView replacement of UITableView. Do even more like Parallax Header, Sticky Section Header. Made for iOS 7.

CSStickyHeaderFlowLayout Contributors For anyone who'd like to be a contributor to the repository, please read the Contribution Guideline Parallax, St

UIViewController drop in replacement with much more customisation
UIViewController drop in replacement with much more customisation

PopupViewController UIAlertController drop in replacement with much more customization You can literally replace UIAlertController by PopupViewControl

Tools for making SwiftUI navigation simpler, more ergonomic and more precise.
Tools for making SwiftUI navigation simpler, more ergonomic and more precise.

SwiftUI Navigation Tools for making SwiftUI navigation simpler, more ergonomic and more precise. Motivation Tools Navigation overloads Navigation view

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.
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

🎯 PredicateKit allows Swift developers to write expressive and type-safe predicates for CoreData using key-paths, comparisons and logical operators, literal values, and functions.
🎯 PredicateKit allows Swift developers to write expressive and type-safe predicates for CoreData using key-paths, comparisons and logical operators, literal values, and functions.

🎯 PredicateKit PredicateKit is an alternative to NSPredicate allowing you to write expressive and type-safe predicates for CoreData using key-paths,

VectorMath is a Swift library for Mac and iOS that implements common 2D and 3D vector and matrix functions

Purpose VectorMath is a Swift library for Mac and iOS that implements common 2D and 3D vector and matrix functions, useful for games or vector-based g

XCode and Swift game based on the generation of random cards and some functions related to the comparison of the results.
XCode and Swift game based on the generation of random cards and some functions related to the comparison of the results.

war-card-game-V1 XCode and Swift game based on the generation of random cards and some functions related to the comparison of the results. Once a card

A collection of Swift functions, extensions, and SwiftUI and UIKit Views.

J's Helper A collection of Swift functions, extensions, and SwiftUI and UIKit Views. Legend: 🔸 UIKit 🔹 SwiftUI 🔺 Shared Installation In XCode 12 go

Fridax enables you to read variables and intercept/hook functions in Xamarin/Mono JIT and AOT compiled iOS/Android applications.

Fridax is a Node package for dealing with Xamarin applications while using the Frida API. Goal • Installation • Usage • Examples • Issues • License Bu

An IOS/IPad OS application that demonstrates various capabilities and functions of ARKit and RealityKit.
An IOS/IPad OS application that demonstrates various capabilities and functions of ARKit and RealityKit.

Augmented Reality Development Demos based on ARKit and RealityKit Summary This repository contains an IOS application that shows the capability of App

Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.
Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

StepProgressView Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView. Usage let progr

Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.
Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView.

StepProgressView Step-by-step progress view with labels and shapes. A good replacement for UIActivityIndicatorView and UIProgressView. Usage let progr

GroupWork is an easy to use Swift framework that helps you orchestrate your concurrent, asynchronous functions in a clean and organized way
GroupWork is an easy to use Swift framework that helps you orchestrate your concurrent, asynchronous functions in a clean and organized way

GroupWork is an easy to use Swift framework that helps you orchestrate your concurrent, asynchronous functions in a clean and organized way. This help

KeyPathKit is a library that provides the standard functions to manipulate data along with a call-syntax that relies on typed keypaths to make the call sites as short and clean as possible.

KeyPathKit Context Swift 4 has introduced a new type called KeyPath, with allows to access the properties of an object with a very nice syntax. For in

Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.
Helper functions for saving text in Keychain securely for iOS, OS X, tvOS and watchOS.

Helper functions for storing text in Keychain for iOS, macOS, tvOS and WatchOS This is a collection of helper functions for saving text and data in th

Functional data types and functions for any project

Swiftx Swiftx is a Swift library containing functional abstractions and extensions to the Swift Standard Library. Swiftx is a smaller and simpler way

Releases(1.3.0)
  • 1.3.0(Apr 14, 2022)

    What's Changed

    • Update ScrollSticky by @muukii in https://github.com/eure/ScrollEdgeControl/pull/5
    • Add Configuration in ScrollSticky by @muukii in https://github.com/eure/ScrollEdgeControl/pull/6
    • fix initialization own color by @bagusandinata in https://github.com/eure/ScrollEdgeControl/pull/3

    New Contributors

    • @bagusandinata made their first contribution in https://github.com/eure/ScrollEdgeControl/pull/3

    Full Changelog: https://github.com/eure/ScrollEdgeControl/compare/1.2.0...1.3.0

    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Mar 29, 2022)

    What's Changed

    • Introduce StickyHeaderView in UIScrollView by @muukii in https://github.com/eure/ScrollEdgeControl/pull/4

    Full Changelog: https://github.com/eure/ScrollEdgeControl/compare/1.1.1...1.2.0

    Source code(tar.gz)
    Source code(zip)
  • 1.1.1(Jan 18, 2022)

  • 1.1.0(Jan 18, 2022)

    What's Changed

    • Rename API by @muukii in https://github.com/eure/ScrollEdgeControl/pull/2

    New Contributors

    • @muukii made their first contribution in https://github.com/eure/ScrollEdgeControl/pull/2

    Full Changelog: https://github.com/eure/ScrollEdgeControl/compare/1.0.1...1.1.0

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Nov 29, 2021)

Owner
エウレカ
This is eureka, Inc. organization.
エウレカ
Animated, customizable, and flexible pull-to-refresh framework for faster and easier iOS development.

KafkaRefresh Animated, customizable, and flexible pull-to-refresh framework for faster and easier iOS development. Report bug · Request feature · 中文文档

H. H. Hsiang 1.2k Dec 11, 2022
Easily add vertical and horizontal pull to refresh to any UIScrollView. Can also add multiple pull-to-refesh views at once.

This is a fork from the famous SVPullToRefresh pod with 2 additional functionalities: Can add multiple pull-to-refresh views into one single UIScrollV

Hoang Tran 42 Dec 28, 2022
Simple refresh control for iOS based on SpriteKit and Core Graphics

RainyRefreshControl Simple refresh control for iOS based on SpriteKit and Core Graphics. Project inspired by concept of Yup Nguyen Installation Instal

Onix-Systems 680 Dec 29, 2022
ESPullToRefresh is an easy-to-use component that give pull-to-refresh and infinite-scrolling implemention for developers.

ESPullToRefresh is an easy-to-use component that give pull-to-refresh and infinite-scrolling implemention for developers.

Vincent Li 1.7k Jan 8, 2023
API-TableView-Swift - API call with URLSession and show data to TableView with swift

API-TableView-Swift API call with URLSession and show data to TableView with swi

Aman Ullah Akhand 1 Sep 3, 2022
✳️ SwiftUI Pull to Refresh (for iOS 13 and iOS 14) package.

Refreshable ✳️ SwiftUI Pull to Refresh (for iOS 13 and iOS 14) package. See complementary article at SwiftUI Pull to Refresh (for iOS 13 and iOS 14).

Geri Borbás 21 Dec 2, 2022
Easy background refresh registration, scheduling, execution, and completion. BGTaskScheduler for the lazy.

EasyBackgroundRefresh Easy background refresh registration, scheduling, execution, and completion. BGTaskScheduler for the lazy. Usage For fast refres

Yonat Sharon 6 Dec 5, 2022
The fastest and easiest way to present a UITableView - in 3 lines of code.

Swift Table The fastest and easiest way to present a UITableView - in 3 lines of code. Powered by Generics to present any data type. No need to use th

Benyam Alemu Sood 16 Nov 1, 2022
iOS15 UIRefreshControl issue reproduction

iOS15 UIRefreshControl issue reproduction

Muukii 2 Oct 8, 2021
A replacement for as which runs in constant time instead of O(n) when the conformance is not satisfiedA replacement for as which runs in constant time instead of O(n) when the conformance is not satisfied

ZConform A replacement for as? which runs in constant time instead of O(n) when the conformance is not satisfied. How it works ZConform does a one-tim

Emerge Tools 20 Aug 4, 2022