Click or drag to resize

PullToRefreshBehaviour Class

Attach it to your ScrollView where the pull to refresh functionality is needed. Browse the PullToRefreshExample scene to see how the gizmo should be set up. An image is better than 1k words.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          Com.ForbiddenByte.OSA.Util.PullToRefreshPullToRefreshBehaviour

Namespace:  Com.ForbiddenByte.OSA.Util.PullToRefresh
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
C#
public class PullToRefreshBehaviour : MonoBehaviour, 
	IScrollRectProxy, IBeginDragHandler, IEventSystemHandler, IDragHandler, IEndDragHandler

The PullToRefreshBehaviour type exposes the following members.

Constructors
  NameDescription
Public methodPullToRefreshBehaviour
Top
Properties
Methods
Events
  NameDescription
Public eventScrollPositionChanged
Not used in this default interface implementation
Top
Fields
  NameDescription
Public fieldexternalScrollRectProxy
Will be retrieved from the scrollrect. If not found, it can be assigned anytime before the first Update. If not assigned, a default proxy will be used. The purpose of this is to allow custom implementations of ScrollRect to be used
Public fieldOnPullProgress
Unity event (editable in inspector) fired when each frame the click/finger is dragged after it has touched the ScrollView Negative values indicate pulling from end
Public fieldOnRefresh
Unity event (editable in inspector) fired when the refresh occurred
Top
Extension Methods
Version Information

Optimized ScrollView Adapter

Supported in: 4.1
See Also