SCPullToRefreshView

@interface SCPullToRefreshView : UIView {
  UIScrollView *_boundScrollView;
  id _target;
  SEL _startLoadingAction;
}

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

Configuration

  • The label that displays the current state of the view.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UILabel *stateLabel;
  • A detail label displayed under stateLabel.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UILabel *detailTextLabel;
  • A UIActivityIndicationView that appears while the table view is being refreshed.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UIActivityIndicatorView *activityIndicator;
  • The text that appears while the table view is being pulled down.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *pullStateText;
  • The text that appears when releasing will refresh the table view.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *releaseStateText;
  • The text that appears while the table view loads its data.

    Declaration

    Objective-C

    @property (nonatomic, copy) NSString *loadingStateText;
  • The arrow image that appears next to stateLabel. This image gets rotated as the table view gets pulled down.

    Declaration

    Objective-C

    @property (nonatomic, readonly) UIImageView *arrowImageView;

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