views:

289

answers:

1

Hi there,

My application is for iPad.

I have a UIViewController as the main view of my application. I have an UIView at the bottom as a footer, and inside 3 UIView (subviews).

My 3 subviews in the footer banner load for each a different UIViewController and display the view of this controller into their view.

I would like when I click on a button into one of this subview (button that belongs to my UIViewController, with a 240x162px view), to make the subview disappear and display a centered popup (500x350px) with an animation into my main view.

To show you an example, WeatherBug for iPad has what I want, when you click on a block on top, the little view flip and a zoom effect is done, that display a centered uiview with more content.

Please tell me where I should look for! Thank you,

A: 

Use the delegate pattern. Assign your "root" view controller as the delegate for your "footer" view controller. When the button is tapped (no clicking on the iPhone), the "footer" view controller will hide the banner, then call a delegate method to handle the tap action; in this case, the "root" view controller then shows your centered popup. When the popup is done, the "root" view controller then tells the "footer" view controller go show the banner again and go back to normal.

Shaggy Frog
Perfect. I did think about it today at work, I got pretty much the same idea. I was using custom delegate to do something else, and just though about trying it this way. You confirm! Just not sure yet about the animation between my view in my footer and the view in my root view controller. I'll try. Thank you!
Dachmt