Skip to content

Instantly share code, notes, and snippets.

@alex-zige
Created December 30, 2013 04:16
Show Gist options
  • Save alex-zige/8177726 to your computer and use it in GitHub Desktop.
Save alex-zige/8177726 to your computer and use it in GitHub Desktop.
custom background image for IOS UIRefreshControl
-(void)preparePulltoRefresh{
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
refreshControl.tintColor = [UIColor whiteColor];
[refreshControl addTarget:self action:@selector(reloadMeetings) forControlEvents:UIControlEventValueChanged];
//creating view for extending background color
CGRect frame = self.tableView.bounds;
frame.origin.y = -frame.size.height;
UIView *refreshBackgroundView = [[UIView alloc]initWithFrame:frame];
refreshBackgroundView.backgroundColor = UIColorFromRGB(0xXXXXXX);
self.refreshControl = refreshControl;
[self.tableView insertSubview:refreshBackgroundView atIndex:0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment