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
-
Unavailable
Undocumented
Declaration
Objective-C
__weak UIScrollView *_boundScrollView
-
Unavailable
Undocumented
Declaration
Objective-C
__weak id _target
-
Undocumented
Declaration
Objective-C
SEL _startLoadingAction
-
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;
-
Used internally to determine the current state of the pull-to-refresh view.
Declaration
Objective-C
@property (nonatomic, readonly) SCPullToRefreshViewState state;
-
Used internally to bind a scroll view to the pull-to-refresh view.
Declaration
Objective-C
- (void)bindToScrollView:(UIScrollView *)scrollView;
-
Method called internally by the framework to set a target and an action for the refresh operation.
Declaration
Objective-C
- (void)setTarget:(id)target forStartLoadingAction:(SEL)action;
-
Method called internally by the framework to indicate that the bound scroll view has started scrolling.
Declaration
Objective-C
- (void)boundScrollViewDidScroll;
-
Method called internally by the framework to indicate that the bound scroll view has ended dragging.
Declaration
Objective-C
- (void)boundScrollViewDidEndDragging;
-
Method called internally by the framework to indicate that the bound scroll view has finished refreshing.
Declaration
Objective-C
- (void)boundScrollViewDidFinishLoading;