Created
December 30, 2013 04:16
-
-
Save alex-zige/8177726 to your computer and use it in GitHub Desktop.
custom background image for IOS UIRefreshControl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(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