Search code examples
iphoneobjective-cipad

How can I get a callback when UITableView has stopped scrolling?


In my iPhone app, I have a bunch of code running in a single method. At the end of the method I have a few lines which need to be delayed so they only run after what goes before, this is because there is animating going on I need to run this code when the animation completes.

I know I could just use an NSTimer, but I was wanting to try something a little more elegant or cleaner.


Solution

  • You can use for the first process :

    – performSelector:onThread:withObject:waitUntilDone:
    

    this will block your thread until the process in done.

    After this your next statement will start to execute.