9

I have been looking around but couldn't find anything good about this.

I would like to customize the default UIRefeshControl with different loader, etc. So far I can only change tintColor & attributedTitle properties and most code I found are just basically creating a new "pulltorefresh" effect but what I want is to just use the UIRefreshControl and customize it a bit.

Is this possible?

rmaddy
  • 314,917
  • 42
  • 532
  • 579
ivanasetiawan
  • 879
  • 1
  • 10
  • 26
  • Here is another thing you can do with refresh control: http://stackoverflow.com/questions/16773215/how-would-i-create-a-status-message-that-briefly-appears-above-a-uitableview/16867684#16867684 – esp Jun 06 '13 at 13:06

1 Answers1

9

You can't add different loader without accessing private APIs, but you can add background image:

UIImageView *rcImageView =
    [[UIImageView alloc] initWithImage:
        [UIImage imageNamed: @"refreshControl.png"]];
[self.refreshControl insertSubview:rcImageView atIndex:0];

assuming self is an instance of UITableViewController subclass.

Image size you need is 320x43px (@2x 640x86px), the middle area (approximately 35px) will be covered by the loader animation.

I show application logo there...

esp
  • 7,314
  • 6
  • 49
  • 79
  • please check this question --> https://stackoverflow.com/q/67056902/15466427 – coceki Apr 13 '21 at 04:34
  • I just want to set a downward arrow on collectionView before loader that indicates the user pull downward the collectionView to refresh, and dismiss arrow when loader comes out – coceki Apr 13 '21 at 04:37