Monday, August 10, 2009
In the iPhone App that I am currently working on, I've got a nice (i) button in the lower right hand corner of each regular view of my application. Tapping on that button causes an info screen to flip into view as one might expect for an App. Basically providing a splash screen including showing the user the current version of the app and a link to the app's web site.
The crazy thing is, that when you tap on the button for the first time during the run of the app (at least in most cases), there is a slight delay and the view appears: BAM! And the nice flip animation either only partially appears or does not appear at all. If it does appear, it kind of shudders in an unprofessional way.
This problem isn't a deal-breaker per-say. I mean, the info screen does come up. No exceptions are generated. And, if you tap on an info button after that during the same run, the animation shows up just fine. It just doesn't have that consistent professional look that I think it should have.
My best guess is that there is some caching of view data, or view controller data going on and something asyncronous going on, so, that it brings up the view the first time before the animation gets a chance to completely run. Of course it is a guess.
Right now, I have separate code in each view controller that happens when the user taps the (i) info button that instantiates an object from the infoViewController class, sets the animation, and calls the proper method to bring up a modal view.
I am thinking now of doing this in my root view controller (with the exception of calling the method to bring it up, assign it to a property, and just call the modal view method whenever I need to. I'm abit lazy, so we shall see if I get to it. My guess is that doing it would make sure that when the user taps on the (i) button the first time and every time afterwards, the info screen will always animate nicely.
Have you run into anything like this?