I've just implemented a UITableView controller and for some reason the refresh control isn't showing up at the top is there something that I've got wrong?
ScoresNotificationsPage
- (id)initWithFrame:(CGRect)frame {
self = [self initWithStyle:UITableViewStylePlain];
self.view.backgroundColor = [UIColor whiteColor];
self.view.frame = frame;
return self;
}
- (void)viewDidLoad
{
[super viewDidLoad];
UIRefreshControl *refreshControl = [[UIRefreshControl alloc] init];
refreshControl.tintColor = [UIColor redColor];
// Assign the refresh control to the table view controllers refresh property.
[refreshControl addTarget:self action:@selector(changeSorting) forControlEvents:UIControlEventValueChanged];
self.refreshControl = refreshControl;
}
MainViewController
Adding the ScoresNotificationsPage with
[self.view addSubview:scoresNotificationsPage.view];