开发者

iPhone: Fade In on Application Load

开发者 https://www.devze.com 2023-02-25 03:36 出处:网络
I have my app up and running and would like to add some polish to it.One of the first things I\'d like to do is improve the transitions.

I have my app up and running and would like to add some polish to it. One of the first things I'd like to do is improve the transitions.

Unfortunately I have speent most of my time in OpenGL and still haven't got 开发者_C百科a solid grasp on working with the UIView system. What is a good way to enter into your App?

I load pretty quickly so I was thinking a quick fade in, but my GL view loads and draws at least a frame before I really get control so I am not sure the best way to go about this.


A quick and dirty way would be to just create a black (or white) solid color full screen UIView overlaying the opengl view, and have it fade its alpha down to zero over some n number of seconds.


There is a SetAlpha method from UIView. In your draw call; decrease gradually the alpha value until 0. When it hits 0, then draw the next "view" of your app (pretty much loads your next 3d objects); and increase the alpha back to 1. should do the trick.

0

精彩评论

暂无评论...
验证码 换一张
取 消