After several minutes running all animations in my application disappeared, even system animations like alert animation and UINavigationController animations. What can be the issue?
P.S. I dont use [UIView setAnimationsEnabled] anywhere.
Well, the answer is - system sometimes disables animations, and, normally, it enables them back on. But in my case, for some reason, it failed to set them back enabled. And this happens only during transitions between UIViewControllers. What I came up with, is to reset [UIView setAnimationsEnabled:YES] after every transition.
Related
I am facing strange problem in my application. If I am using my Application in a normal way then all the things are going good and transition is smooth when going to next controller or coming from the previous one.
Problem arises when say I launched my application and say I let my application idle for few minutes, it is active not in background then in this case the transition effect is not smooth when going to next screen or coming back to previous one. It feels like my application is going slow,Loader comes in slow motion and hides too, Navigation also seems to be slow. Did anyone faced the same issue like me,if yes please share the solution.
I have an app who's main view that has 5 modal transitions (presentViewController) and one custom drop down animation ([UIView animateWithDuration:0.15 delay:0.0 options:UIViewAnimationOptionCurveEaseInOut animations:^ { ...).
For some reason - potentially connected to updating to the new Xcode 7 beta - after a couple second ALL animations, including the iOS view transitions, stop animating for the entire app.
I'm aware that CALayer has it' own animation thread but I didn't think that it could be blocked.
I can't share code unfortunately, but does anyone have an idea of where to start looking?
I've looked at all the things I can find here and none of the answers seem to be about this particular type of issue.
Thanks
This can happen if you're calling the UI from a thread other than Main.
This one ended up actually being because there was some bad coding on the business logic that was, in fact, blocking the UI thread.
So 1up for Andres Canella. The problem was the blocking of the main thread, only it was business logic blocking it in seemingly unrelated - and difficult to debug - ways.
NEVER BE AFRAID TO REBUILD "TAR BALL" LEGACY CODE!!!!!!!!!!
Also 1up for frakman1 because that's a good reminder.
Thanks all.
Yesterday I updated my iPhone 5 to iOS 7.1 and found a strange bug in my current application. There is few UINavigationControllers. After few transition in it the animation of transition become to fast, like there is no animation at all. But more strange that all system animation became to fast, default UITableCell animation, modal window animation and so on.
Does someone know what is this? On device with 7.0.6 there is no such problem.
Looks like it starts to happen after few calls of:
[navController setViewControllers:popViewControllers animated:animated];
PS: One more thing - my app is still using iOS 6.1 SDK.
PPS: i don't use custom default animations.
UPDATE: With 7.1 SDK problem still exists.
I have similar problem after updating my iPhone from iOS 7.0.3 to 7.1. I go back and forth several times using the navigation bar and after a few tries there is no transition animation. All animations are broken when it happens, eg. device rotation animation. After reaching this state, few more back and forth transitions cause a crash.
Edit 3:
In my case the problem was because of accessing GUI objects from a background queue. If you experience this issue make sure all GUI objects are accessed from the main thread. Many thanks to Eugene for helping me figure this out.
I have a strange issue both on mobile device and in simulator.
After a while spent in the application, animations on UIView are disabled (like if animated was set to NO), notably on :
pushViewController in a UINavigationController (also true for popTo)
displaying a UIActionSheet
switching between views with IIDeckViewController
This is quite strange as all transition are usually animated, and in a non predictable way, they all become non-animated
Everything was working well a few days agos, and as far as I can remind, I did not make any changes that should lead to such a behavior.
Any ideas ?
Thanks
Cheers
We recently had some trouble like this, the culprit was initiating some animations from a non-main thread (perhaps you are initiating a transition). This caused some trouble with animations transactions getting rolled back and this broke animations until the transaction was rolled back. There were some entries on the console pointing to CA transactions. Setting CA_DEBUG_TRANSACTIONS=1 on the environment quickly revealed the stack of where the the transactions were started.
The fix was to not do anything that would create transactions from a non-main thread.
I am developing an iPhone applciation in which I am applying UIView Animation, but when multitasking occurs like user answers a call or a skype call, my animation is disturbed.
Is there any way to avoid this?
EDIT
Suppose a scenario Skype call is running, in the meanwhile i started my application that has some UIView Animation, while skype call is running its behaviour turns strange? Any comment on that ??
You can't avoid disturbance from incoming calls and other things like that. What you can do is to save the state of you animation in the moment when interruption happens and restore this exact state to continue your animation when app is back in foreground.
What usually happens is that the animation jumps to the "end point" instantly. In case you have cascading animations it's best to make sure you are not in multitasking when starting the new one.