Tell me please. With this form of recording:

- (void)scrollViewDidScroll:(UIScrollView *)scrollView CGPoint offset = scrollView.contentOffset; CGRect bounds = scrollView.bounds; CGSize size = scrollView.contentSize; UIEdgeInsets inset = scrollView.contentInset; float y = offset.y + bounds.size.height - inset.bottom; float h = size.height; float reload_distance = 800; if(y > h - reload_distance && loadData == NO && new == NO) { NSLog(@"load more rows"); [APIDownload downloadWithURL:MyWebString delegate:self]; } 

The problem is that the [APIDownload downloadWithURL: MyWebString delegate: self] method; It is not called until the scrolling does not stop, tell me how to fix it.

  • and the log gives? condition passes? What are the values ​​of the variables in the condition before checking? - tragvar
  • Yes, the check passes, in the log writes: NSLog (@ "load more rows"); but the download does not start. - Heinrich Korenyuzhenko
  • Try to highlight this function in a separate method. I had a similar, just with delegate methods. - dark_Haron
  • Unfortunately, as soon as I did not try, I did another function and selectors. Something in any way. - Heinrich Korenyuzhenko
  • I did not see about the animation :) ... While the "processing" of the Application's processing "stops", and moreover, the appeal to methods that require external interaction is fulfilled. Conclusion: 1. Change the architecture, create an "invisible" cache, which is loaded before the animation. Use it. 2. Turn on the "streams" and load in a separate stream. - dark_Haron

1 answer 1

Strange solution to the problem. Googling like others do it. And as for your question. How do you know that the method is not called? Maybe just delegates are not called? And second, check the streams.