12

Possible Duplicate:
SplitView like Facebook app on iPhone

another break away .net developer here now trying to get used to the world of IOS.

I like the layout of the new Facebook iPhone app (October 2011), and want to implement something similar in an app I am doing. I know that the UISplitterControl is not available on iPhone but Facebook seem to have pulled a little magic to make it appear so on their new app.

In Facebook's implementation it looks to me that they have used a UINavigationController which slides to the right by x when the NavigationBar icon is tapped thus exposing a view underneath with the menu items.

Would appreciate if someone could help me work this out as the solution would also be a great learning curve.

I've tried setting a UINavigationController as the AppDelegate window root view controller, then using initwithframe to load a custom view which includes the menu items as a subview hidden behind the UINavigationcontroller root view. Then when the UINavgationController menu item button is clicked slide the NavigationController to the right thus exposing the view underneath with menu items.This presents two problems, first that the subview positioning doesn't work and also how can I slide the actual UINavigationController to the right to expose the menu view underneath.

Please help!

Community
  • 1
  • 1
Lisa Young
  • 121
  • 1
  • 1
  • 3
  • I hope the Three20 (http://three20.info/) team will release an update of their code with this feature, its just another launcher style – DarkLeafyGreen Oct 23 '11 at 20:52

6 Answers6

10

Might also want to check out my implementation on Github. It's specifically designed to resemble Facebook's implementation as much as possible (from a technical point of view). Also it leverages iOS 5's new UIViewController-Containment features, which most others don't. Thus it works flawlessly in both landscape and portrait modes. It's universal of course and highly flexible. One class only. The way you use it is similar to any other Apple made controller.

pkluz
  • 4,871
  • 4
  • 26
  • 40
  • I was checking your implementation. In your example you create your hierarchy programmatically, using nibs. Is there a way to create this hierarchy using the storyboard feature in Xcode 4? – Pedro Mancheno Mar 20 '12 at 00:03
  • 3
    I just managed to do it. I created a subclass of ZUUIRevealController, made it the initial ViewController for my Storyboard based app and created it's front and end controllers in it's viewDidLoad. Great implementation! – Pedro Mancheno Mar 20 '12 at 02:20
  • How to implement this controller in storyboard?(Not as initial) Is it possible? – Shmidt Sep 25 '12 at 08:24
  • I think some people already did that and posted their forks: https://github.com/pmcconnell/Reveal-ViewControllers-with-Storyboard This one explains how he did it. You can apply the same steps to the original repo. Sorry I don't have much experience with storyboards. – pkluz Sep 25 '12 at 18:14
7

there is a similar post here: SplitView like Facebook app on iPhone.

you can also checkout the code directly at: https://github.com/mystcolor/JTRevealSidebarDemo

Community
  • 1
  • 1
James Tang
  • 995
  • 1
  • 10
  • 17
2

I'm having exactly the same question, my guess is that the "SplitView" is actually more likely a modal view that takes up only part of the screen. I haven't had the time to try it just yet but the following post might give some hint on how this can be done:

http://ramin.firoozye.com/2009/09/29/semi-modal-transparent-dialogs-on-the-iphone/

1

I created a component that mimics the behavior of the Facebook slide out menu. It is available on github.

Michael Frederick
  • 16,664
  • 3
  • 43
  • 58
1

Here is link from stack overflow where people have discussed on same topic. Also there are several links that can be helpful: SplitView like Facebook app on iPhone

Community
  • 1
  • 1
Dejan Balaban
  • 461
  • 4
  • 11
1

You might want to check out this project

https://github.com/aaronbrethorst/StackScrollView

Here some howto http://cocoacontrols.com/posts/how-to-build-the-twitter-ipad-user-experience

Similar to the one "MyPad" is using.

Note: This is only for iPad but you might find some usefull stuff in it

Chris
  • 3,581
  • 8
  • 30
  • 51