views:

61

answers:

1

I looked at Apple's UIModalTransitionStyle, but didn't see what I was looking for. I want to do the same thing that the Facebook iPhone App does; when you touch on a button on the Facebook's homescreen, the new UIView appears (and then disappears when you are done) from the middle of the screen. I would like to implement similar transitions in my iPhone app, and I was wondering if there was a quick way to do it (already precoded), and if not, how would I code it so I can do the same thing?

Edit: To clarify, the transition should have the UIView grow out of the middle of the screen, and then it fills up the entire view. When the user dismisses the view, the view shrinks into the middle of the screen, getting smaller until it has disappeared. Just like in the Facebook app.

Thank you!

+1  A: 
myView.center = parentView.center

where myView is your new UIView that is appearing and parentView is the view that holds the button or else you could reference the application's window.

Jason
Not quite what I'm looking for... This makes the view not center, and even so, it does not animate it coming from the middle of the application. Open the Facebook app a and go to their launch screen. Open a few views, close them, and see what I mean.
Wayfarer