ODRefreshControl icon indicating copy to clipboard operation
ODRefreshControl copied to clipboard

Activity View doesn't appear in UITableView when it has a tableHeaderView

Open jvenegas opened this issue 11 years ago • 0 comments

Hello,

The UIActivityView doesn't appear after calling "beginRefreshing". That is only happening when a UITableView has a tableHeaderView set up, like this code:

ODRefreshControl *refreshControl = [[ODRefreshControl alloc] initInScrollView:self.tableView]; [refreshControl addTarget:self action:@selector(dropViewDidBeginRefreshing:) forControlEvents:UIControlEventValueChanged]; self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 10)]; [refreshControl beginRefreshing];

Thank you for this Refresh Control guys!

Edit

I fixed with this code:

   [refreshControl beginRefreshing];
    //Hack to fix the Bug in the ODRefreshControl when UITableView has a header
    [tableView setContentOffset:CGPointMake(0.0f, -44.0f) animated:YES];

jvenegas avatar Apr 12 '13 10:04 jvenegas