Inherits from UIView
Declared in SCPullToRefreshView.h

Overview

This special view provides table views with the common pull-to-refresh functionality.

Once pull-to-refresh is enabled in the table view model, this view will automatically handle displaying the pull messsage, inform the model that the table view needs refreshing, and return back to normal state after the table view has done refreshing its contents.

Sample use:

self.tableViewModel.enablePullToRefresh = TRUE;
self.tableViewModel.pullToRefreshView.pullStateText = @"Pull to refresh tasks";
self.tableViewModel.pullToRefreshView.releaseStateText = @"Release to refresh tasks";
self.tableViewModel.pullToRefreshView.loadingStateText = @"Loading new tasks...";

See also: SCTableViewModel

Tasks

Configuration

Internal Properties & Methods (should only be used by the framework or when subclassing)

Properties

activityIndicator

A UIActivityIndicationView that appears while the table view is being refreshed.

@property (nonatomic, readonly) UIActivityIndicatorView *activityIndicator

Declared In

SCPullToRefreshView.h

arrowImageView

The arrow image that appears next to stateLabel. This image gets rotated as the table view gets pulled down.

@property (nonatomic, readonly) UIImageView *arrowImageView

Declared In

SCPullToRefreshView.h

detailTextLabel

A detail label displayed under stateLabel.

@property (nonatomic, readonly) UILabel *detailTextLabel

Declared In

SCPullToRefreshView.h

loadingStateText

The text that appears while the table view loads its data.

@property (nonatomic, copy) NSString *loadingStateText

Declared In

SCPullToRefreshView.h

pullStateText

The text that appears while the table view is being pulled down.

@property (nonatomic, copy) NSString *pullStateText

Declared In

SCPullToRefreshView.h

releaseStateText

The text that appears when releasing will refresh the table view.

@property (nonatomic, copy) NSString *releaseStateText

Declared In

SCPullToRefreshView.h

state

Used internally to determine the current state of the pull-to-refresh view.

@property (nonatomic, readonly) SCPullToRefreshViewState state

Declared In

SCPullToRefreshView.h

stateLabel

The label that displays the current state of the view.

@property (nonatomic, readonly) UILabel *stateLabel

Declared In

SCPullToRefreshView.h

Instance Methods

bindToScrollView:

Used internally to bind a scroll view to the pull-to-refresh view.

- (void)bindToScrollView:(UIScrollView *)scrollView

Declared In

SCPullToRefreshView.h

boundScrollViewDidEndDragging

Method called internally by the framework to indicate that the bound scroll view has ended dragging.

- (void)boundScrollViewDidEndDragging

Declared In

SCPullToRefreshView.h

boundScrollViewDidFinishLoading

Method called internally by the framework to indicate that the bound scroll view has finished refreshing.

- (void)boundScrollViewDidFinishLoading

Declared In

SCPullToRefreshView.h

boundScrollViewDidScroll

Method called internally by the framework to indicate that the bound scroll view has started scrolling.

- (void)boundScrollViewDidScroll

Declared In

SCPullToRefreshView.h

setTarget:forStartLoadingAction:

Method called internally by the framework to set a target and an action for the refresh operation.

- (void)setTarget:(id)target forStartLoadingAction:(SEL)action

Declared In

SCPullToRefreshView.h