Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone: All animation stopped working after a while

I've gotten some strange behavior lately. All animation suddenly stops working sometimes. Sometimes everything runs smooth, and other times this happens. Pushing and popping views just snaps into place, UITableView cellrow animation doesn't work.

The app uses a lot of background threads so maybe there is something in there?

I can't really post code since I don't know where the problem is.

Has anyone had the same problem?

like image 647
BlackMouse Avatar asked Jun 14 '12 06:06

BlackMouse


1 Answers

Could that be you attempting to update UI/animate in different background threads?

Try?

dispatch_async(dispatch_get_main_queue(), ^{
  // code to update ui or start animation
});
like image 170
Alfred Avatar answered Nov 09 '22 11:11

Alfred