UIRefreshcontrol jitters when pulled down and held

后端 未结 7 560
野趣味
野趣味 2021-01-01 23:21

I have created a UIRefreshcontrol in my tableviewcontroller as follows in the viewdidload method :

    refresh = [UIRefreshControl.alloc init];
    refresh.a         


        
7条回答
  •  时光说笑
    2021-01-02 00:03

    Usually you use UIRefreshControl to trigger an asynchronous reload operation, and endAnimating should be called after a certain period of time has elapsed. It looks here like the moment the refresh control begins animating, you're ending it immediately. This is probably confusing UIRefreshControl.

    Try calling endAnimating after a period of time has elapsed, or in another runloop cycle (e.g. call it in dispatch_async). There appear to be other problems with your code (for example, your tableView:cellForRowAtIndexPath: is creating cells incorrectly), so there might be other problems lurking in there.

提交回复
热议问题