I'm trying to download a file with a third-party AFNetworking library. At its core, there is an NSOperation object for which you can set a completion block when the download is complete.
Somehow, animateWithDuration: inside this block does not work correctly: both completion blocks and the actual animation are delayed by ~ 5 or 60 seconds or do not start at all. The only way to find out that it starts at all is to call NSLog.
Let me demonstrate this:
[UIView animateWithDuration:0.1 animations:^{ controller.view.alpha=0.5; NSLog(@"First Try Start"); } completion:^(BOOL finished) { NSLog(@"First Try End"); }];
Console output:
2013-06-28 23:22:11.374 Molto Luce[7831:c07] First Try Start 2013-06-28 23:22:11.477 Molto Luce[7831:c07] First Try End 2013-06-28 23:22:11.742 Molto Luce[7831:1303] downloadComplete! 2013-06-28 23:22:11.745 Molto Luce[7831:1303] Second Try Start 2013-06-28 23:23:05.007 Molto Luce[7831:c07] Second Try End
Help is appreciated!
source share