Expand & collapse of element / view

Hi. I have been strugling alot with a problem.


I need to have a panel of some sort and when it is clicked it should expand and its height and shows as an overlay over the rest of the layout. When clicked again it should collapse back to default size.


I have seen it can be done with UITableView but i don't think that would fit my solution.


My layout is:


A top header logo and below the logo i have an red status bar. Below the status bar i have a MapView that fills out the rest of the layout. When the status bar is clicked it should expand in size and show some extra buttons. But i had no success finding any solutions about how to go on with this.


Do you guys have any ideas?

I am using the Xcode layout designer to build my layouts.

Replies

Could you show the code you have so far ?

- the action when you tap status bar

And tell what you get compared to what you expect.


But i had no success finding any solutions about how to go on with this.

What is it you do not achieve ?

- resize the view ?

- get the other view (Mapview) to move ?

- display the content ?

- …


How have you defined constraints between view and MapView ?

Analyzing on the comments about code would not be very efficient.