UIRefreshControl在分配给它的动作之前自动调用cellForRowAtIndexPath

时间:2017-02-03 07:13:07

标签: ios objective-c uitableview uirefreshcontrol

我的UIRefreshControl中有一个TableView。每当用户从顶部拖动到刷新时,在分配给它的操作之前立即调用cellForRowAtIndexPath。我怎么能避免这个?

我尝试将操作移至UIRefreshControl,但不会自动调用同一cellForRowAtIndexPath

UIRefreshControl代码

self.refreshControl = [[UIRefreshControl alloc] init];
self.refreshControl.tintColor = [UIColor whiteColor];
[self.refreshControl addTarget:self
                        action:@selector(RefreshControlMethod)
              forControlEvents:UIControlEventValueChanged];
[table addSubview:refreshControl];

0 个答案:

没有答案