From 04029ec28c9f0814cb9a6d93c7f388ee3091f25f Mon Sep 17 00:00:00 2001 From: Dan Ziemba Date: Fri, 4 May 2012 08:45:49 -0400 Subject: [PATCH] Allow custom status label Call setStatusLabelText: inside of you pullToRefreshViewShouldRefresh to change the 'Loading...' text. --- PullToRefreshView.h | 1 + PullToRefreshView.m | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/PullToRefreshView.h b/PullToRefreshView.h index f2b96ef..2dbd169 100644 --- a/PullToRefreshView.h +++ b/PullToRefreshView.h @@ -60,6 +60,7 @@ typedef enum { - (id)initWithScrollView:(UIScrollView *)scrollView; - (void)finishedLoading; - (void)beginLoading; +- (void)setStatusLabelText:(NSString *)text; - (void)containingViewDidUnload; @end diff --git a/PullToRefreshView.m b/PullToRefreshView.m index 607cc9a..8e5c704 100644 --- a/PullToRefreshView.m +++ b/PullToRefreshView.m @@ -134,6 +134,10 @@ - (void)beginLoading { [self setState:kPullToRefreshViewStateProgrammaticRefresh]; } +- (void)setStatusLabelText:(NSString *)text { + [statusLabel setText:text]; +} + - (void)finishedLoading { if (state == kPullToRefreshViewStateLoading || state == kPullToRefreshViewStateProgrammaticRefresh) { [UIView beginAnimations:nil context:NULL];