I have a strange problem, the completion block from presentViewController doesn't execute lately.
This is the code called on button tap
DebugViewController * x = [[DebugViewController alloc] init];
x.view.backgroundColor = [UIColor redColor];
[self presentViewController:x animated:YES completion:^{
NSLog(@"Hello world %@" , self );
}];
DebugViewController is this class, self is a UIViewController in a structure like this:
JASidepanels ---> (center panel) UINavigationController ---> self
As expected, the exact same code works in any other project, but it isn't working in mine since a few weeks. I recently added JASidePanels and some other Pods.
Here is what know surely :
- the modal is presented, viewWillAppear and viewDidAppear are called, it animates in, it works correctly
- viewWillDisappear is called on presenting VC, dealloc isn't, so it is live.
- Other blocks work.
- It is on the main thread
Any idea how could I debug why the block doesn't execute for me ?
Edit: Wow, this is extremely strange. I debugged whole day and tried to delete code line-by-line. However it seems I found something really really interesting. If on any of my viewcontrollers there is a property named exactly currentAction (which is the case in one of my VCs), the completion blocks won't execute in the whole application ! Can someone please confirm ? Here is a gist GIST, change it to currentAction.