I hate to post this but I am seeing unwanted animation in an iPhone app that I am working on. I have never seen this before in my apps or any other apps.
This app is for iOS 4.2 and for iPhones only. The weirdness is happening even on an iPhone4.
Examples:
When the application in question launches a UIAlertView
, it "flies in from the top or top left."
When any UITableView
scrolls, the new (standard) cell data "expands in from the left of the cell" when first coming into view and thus populated.
When a UITextField
has text entered into it, the typing is slow and you can see the cursor slide to the right over the new letter. If there is a "clear" button in the UITextField
, it slides from the left side to UITextField
is first entered into.
When a UIPickerView
is scrolling, scrolling to a newly displayed row is "flying" the new row data in from the top left.
The overall behavior is like to old old old Apple II+ basic where you could set "speed=20" and "slow" the computer down.
What I know: This is happening on multiple phones (4 and 3Gs). It does not happen in my other apps. It does not happen in other apps in general. It seems to be consistent across the entire app. This is not a small project so I am not certain exactly when it started, but it did not begin with this behavior. There is no animation associated with the mentioned items. The problem seems to be affecting everything in the application.
There is even an example of a free standing code base app, that when integrated into this prpoblem app, displays the same problems.
Has anyone seen such behavior before? I am not the sole developer so is there some possible setting someone else could set that causes this?
It sounds like you're leaving UIView animations un-finished. If you begin an animation but never finish it, all UIView manipulations after that point will be animated, just like you describe. The odd part is I thought UIKit would terminate them for you (and log a message) if control passed back to the runloop with an open animation block. Either that no longer happens, or you're constantly starting new animation blocks.
You should look over your code for all instances of +[UIView beginAnimations:context:]
and ensure that they're all balanced by a corresponding +[UIView commitAnimations]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With