UIRefreshControl incorrect title offset during first run and sometimes title missing

前端 未结 8 968
自闭症患者
自闭症患者 2020-12-04 15:46

The text is offset wrong by the first launch of UIRefreshControl... later sometimes the refresh text doesn\'t show up at all and just the spiny is visible

I don\'t t

8条回答
  •  星月不相逢
    2020-12-04 16:13

    This is definitely an iOS 7 bug, but I haven't figured out exactly what caused it. It appears to have something to do with the view hierarchy — adding my UITableViewController as a child view to a wrapper view controller appeared to fix it for me at first, although the bug is back since iOS 7 GM.

    It looks like adding the following code to your UITableViewController after creating the refresh view fixes the positioning issue for good:

    dispatch_async(dispatch_get_main_queue(), ^{
        [self.refreshControl beginRefreshing];
        [self.refreshControl endRefreshing];
    });
    

提交回复
热议问题