Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone dev: Creating sliding drawers like Path and Facebook apps

The new Facebook app seem to have done away with the grid-icon layout, with a more interesting custom navigation layout where the bottom-most view shows all the options (like Profile, News Feed, Messages etc for Facebook) and clicking on one of them brings another view sliding over the top. You can press the 3-lines button to then expose the bottom-view again, but the current view is partially visible. The Path app also recently updated to match this scheme.

What's the best way to recreate this? I've searched for any open-source options but haven't found them. Three20 doesn't seem to support this either.

like image 696
Z S Avatar asked Dec 02 '11 11:12

Z S


8 Answers

Another option that I wrote: ECSlidingViewController

It has support for orientation changes like Facebook and sliding to the left like Path.

Video demo: http://vimeo.com/35959384

Code: https://github.com/edgecase/ECSlidingViewController

like image 98
Michael Enriquez Avatar answered Oct 02 '22 13:10

Michael Enriquez


Try These from Cocoa Controls:

JTRevealSidebar http://cocoacontrols.com/platforms/ios/controls/jtrevealsidebar

clcascade http://cocoacontrols.com/platforms/ios/controls/clcascade

StackScrollView http://cocoacontrols.com/platforms/ios/controls/stackscrollview

Many more on the same site like: http://cocoacontrols.com/platforms/ios/controls/mfslidingnavigationcontroller http://cocoacontrols.com/platforms/ios/controls/psstackedview

like image 25
Yosi Taguri Avatar answered Sep 30 '22 13:09

Yosi Taguri


I found a really nice project on github:

https://github.com/devindoty/DDMenuController

like image 39
andreschneider Avatar answered Sep 29 '22 13:09

andreschneider


Everything I've seen on the internet and those recommended by Yosi Taguri are all way too complicated. Drawers can be achieved by a very simple category to UINavigationController with no graphics asset whatsoever and no class extension needed, and backwards compatible with iOS 3.0!

Take a look a this:

http://code.google.com/p/drawer-navigation-controller/

Here is a video http://www.youtube.com/watch?v=5T-1-_pFbG0

like image 39
Ephraim Avatar answered Sep 29 '22 13:09

Ephraim


This project (not mentioned above) looks like the most mature and polished to me: https://github.com/gotosleep/JASidePanels

Also, seems to still be active.

Edit: I have since transitioned to: https://github.com/mutualmobile/MMDrawerController which IMO is an almost perfect implementation.

like image 24
mxcl Avatar answered Oct 01 '22 13:10

mxcl


Check my answer here - SplitView like Facebook app on iPhone - which contains a list of open-source codes.

like image 45
Sagar Avatar answered Oct 01 '22 13:10

Sagar


if anyone's wondering which one to choose among JTReveal and DDMenu, I'd suggest DDMenucontroller over JTRevealSidebar (haven't used the other options listed by @Yosi). Its a lot simpler, lighter and works exactly the way the Path app works (and it is easier to modify to suit your requirements). Havent seen the issue of black background mentioned by @Henning

like image 39
Nitin Alabur Avatar answered Oct 01 '22 13:10

Nitin Alabur


My project FRLayeredNavigationController on GitHub goes in about the same direction.

(The spacing between the layers is easily configurable and it supports rotation of course).

Have a look at the demo videos/screenshots:

  • http://youtu.be/v_tXD_mL05E
  • http://youtu.be/q66HX2td_uc
  • https://github.com/weissi/FRLayeredNavigationController/raw/master/FRLayeredNavigationControllerScreenshot1.png
  • https://github.com/weissi/FRLayeredNavigationController/raw/master/FRLayeredNavigationControllerScreenshot2.png
like image 37
Johannes Weiss Avatar answered Oct 01 '22 13:10

Johannes Weiss