0

Is it possible to change the UIRefreshControl title before it appear on screen ?

Actually, I use this code to change the title in my update method :

NSString *refreshControlTitle = @"Pull to refresh...No new item to show";
NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObject:[UIColor colorWithRed:0.35 green:0.78 blue:0.98
                                                                                                   alpha:1.0]
                                                                            forKey:NSForegroundColorAttributeName];
NSAttributedString *attributedTitle = [[NSAttributedString alloc] initWithString:refreshControlTitle attributes:attrsDictionary];
refreshControl.attributedTitle = attributedTitle;

(Some text changes are done depending on the situation), but the text is only changing after the refresh is done.

How could I do to actualize the text just before the user begin to see the refreshControl ?

Thanks in advance !

Synny
  • 542
  • 1
  • 4
  • 18

1 Answers1

3
- (void) scrollViewWillBeginDragging:(UIScrollView *)scrollView {
}

try to put title in this method

NSNoob
  • 5,548
  • 6
  • 41
  • 54
vibhor
  • 111
  • 6