Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigation controller popViewControllerAnimated : yes is not working as expected

I am using following line of code:

[self.navigationController popViewControllerAnimated:YES];

But it is not behaving in ios 7 as it doing in ios 6.Some times it does not pop controller while we are pressing back button 2- 3 times in succession.
Resulting in abrupt behaviour in navigation bar and deallocating a controller but showing the same on ui .
So when we press anything on that controller it results to a crash since controller is already deallocated.

like image 733
user3441955 Avatar asked Mar 20 '14 12:03

user3441955


1 Answers

Check if you're running the code on the UI thread

like image 178
cynistersix Avatar answered Sep 17 '22 18:09

cynistersix