Re:The Instapaper Default.png dilemma
by pkaler on Friday November 12, 2010 @02:19AM
(#1896837)
Animate from Default.png to the first view:
Warning: tapped out that code off the top of my head and didn't put it through a compiler.
[ Parent
| on HN ]
May I ask why you aren't using the UIView animations, which, for something like this, are easier (and don't need the extra CA power)?
For this case, do this (also uncompiled):
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:3.0];
[defaultImageView setAlpha:0.0];
[UIView commitAnimations];From the documentation: http://developer.apple.com/library/ios/#documentation/uikit/...
Use of this method is discouraged in iOS 4.0 and later. You should use the block-based animation methods instead.
Frankly, it's because I can't remember the block based methods off the top of my head yet.Interesting; I didn't know that. The block-based methods are, of course, better, but then you can't support iOS 3.x, which is still a pretty big percent of users.
Thanks!
I've tried to do this with my own app before. I ran into difficulties doing it, if I remember right, because the orientation data is not fully initialized at the point in the launch sequence that you need it. It always reports the default orientation.