0

Before when i used Apples UIRefreshControl i could have a label show at the bottom of the Refresh Control like this :

UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
    [refreshControl addTarget:self action:@selector(addReceipt:)
             forControlEvents:UIControlEventValueChanged];
    self.refreshControl = refreshControl;

    NSString *s = @"Swipe Down to Add Receipt";
    NSMutableAttributedString *a = [[NSMutableAttributedString alloc] initWithString:s];
    [a addAttribute:NSForegroundColorAttributeName value:[UIColor darkGrayColor] range:NSRangeFromString(s)];
    refreshControl.attributedTitle = a;

Now I switch to ODRefreshControl for the custom activity indicator and i am unable to find a solution! My code for ODRefreshControl (Just for it to work):

ODRefreshControl *refreshControl = [[ODRefreshControl alloc] initInScrollView:self.tableView];
    [refreshControl addTarget:self action:@selector(dropViewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged];
Kyle Greenlaw
  • 737
  • 1
  • 8
  • 20

1 Answers1

0

It does not look like it is possible to support this type of thing out of the box with this control. Take a look through the code, it doesn't appear to support an attributedTitle or anything like it. Also, I'm assuming you're using this control:

https://github.com/Sephiroth87/ODRefreshControl

If that's the case you probably have a few options:

  1. You'll have to write some code in the ODRefreshControl source yourself to add the label, most likely in the initWithScrollView method, but that might not be totally accurate.
  2. Ask the developer to add it in a future release (it appears you already did).
  3. Go back to using the Apple Refresh control. Why did you prefer ODRefreshControl if you desired a title label?
Aaron
  • 7,055
  • 2
  • 38
  • 53