I am seeing that all ios animations in my app stop working.Its happening very frequently in iOS7.
Hey guys I had an app which is supporting iOS 5, 6 and 7.I am seeing recently that all iOS animations stop working in the app in iOS7??
I am seeing that all ios animations in my app stop working.Its happening very frequently in iOS7.
Hey guys I had an app which is supporting iOS 5, 6 and 7.I am seeing recently that all iOS animations stop working in the app in iOS7??
I ran into this problem recently with some views I am laying out for size calculations on the background thread. By swizzling
setAnimationsEnabled:
I found that the only time I was disabling animations from the background thread was in-[UIImageView setImage:]
.Because this view was never rendered and image changes weren't required for my calculation, I was able to enclose this test in a main thread call:
It's worth noting I don't hit this issue in the initial view instantiation because I already load my template views in the main thread to avoid a Xib loading issue.
Other issues may be more complex but you should be able to come up with similar workarounds. Here's the category I use to detect background disabling of animations.
Update
It turns out that
UIWebView
actually makes unsafe calls tosetAnimationsEnabled:
when displaying a media element (rdar://20314684). This makes the above method very painful to have active all the time if your app allows arbitrary web content. Instead I've started using the below method as it lets me turn the breakpoint on and off and continue after failure:With this code, you can stop your app by adding a symbolic breakpoint on
SEViewAlertForUnsafeBackgroundCalls
or just sticking a breakpoint in the function body.Gist
In IOS 7 when some main method action is performed on background thread then the animations get disabled.
so for this you need to re-enable the animations like (A workaround)
May be this can help.
Extending Vinay's solution, that's what I do:
It seems to solve the problem.