iphoneiosuimodaltransitionstyle

Modal/menu sliding in from the top


I'd like to create a menu sliding from the top with a list of options. More specifically, when the user clicks the navigation bar, I would like that a kind of modal view will slide from the status bar to the bottom. The modal will be a tableview.

I'd like something similar to the app Foursquare where (in the explore tab)

the navigation bar if clicked will show a kind of menu

if you click the navigation bar a menu, sliding from above, will appear like this:

the modal displaying the menu slides from up to down

How can I build such a modal/menu?


Solution

  • Check out DDSlidingPanels on github. There is an example project to help you get started. Is iOS 6+ because it uses nested view controllers and autolayout.

    DDSlidingPanels

    I like it because:

    1. It is customizable (pull-out tab, position left, right, top, bottom, size of pull-out, supports dragging gestures for pulling down, pushing back, etc.).
    2. It is easy to implement in your own project (the example project is helpful).

    I have used it in one of my projects successfully and customized it quite a bit. I don't have any affiliation with the author.