Alejandro L.
Alejandro L.

Reputation: 1076

iOS Slide/Swipe menu like facebook app

I know there are tons of projects, I searched in https://www.cocoacontrols.com/ and found some very interesting, like MasterDetailController, that is the simlpest one and I got working very good.

But now I have a problem, and probabbly you can help me with another cool and simple slide control, or just a matter of simple tweak of current control or coding.

The main issue is that the MasterDetailController must be set on self.window.rootViewControler = self.principal;

/* THIS IS THE APPDELEGATE */
// This is the slide menu view controller
UIViewController *master = [[UIViewController alloc] initWithNibName: @"MasterView" bundle: nil];
// This is the body view controller
ViewController *detail = [[ViewController alloc] initWithNibName: @"ViewController" bundle: nil];
// This is the Master detail controller 'driver'
self.principal = [[[MasterDetailController alloc] initWithMasterViewController: master detailViewController: detail] autorelease];
// Then we set the 'driver' as rootView
self.window.rootViewController = self.principal;
[self.window makeKeyAndVisible];

Now, I want more ViewControllers to have the slide menu like facebook app not just the rootViewController.

So, how can I do it?

Thanks.

PS: This is the control I am currently using https://www.cocoacontrols.com/controls/masterdetailcontroller

Upvotes: 1

Views: 14402

Answers (5)

arturdev
arturdev

Reputation: 11039

You can use this simple library

https://github.com/arturdev/AMSlideMenu

This exactly what you need. Its FULLY customizable and with different animations. In demo project you can see how to implement multiple menus/viewControllers in your app.

Upvotes: 0

aryaxt
aryaxt

Reputation: 77646

Here is one I wrote. Pretty simple to use. It's built on top of UINavigationcontroller and doesn't require any kind of sub-classing on your view controllers.

https://github.com/aryaxt/iOS-Slide-Menu

Upvotes: 0

user4003752
user4003752

Reputation:

if you are creating slide/swipe like facebook

application then follow link which is good example of this

https://github.com/edgecase/ECSlidingViewController

Upvotes: 3

lakshmen
lakshmen

Reputation: 29094

How about this: https://www.cocoacontrols.com/controls/uiscrollslidingpages. Sliding scrolling viewcontroller. Instead of rootviewcontroller, pass this...

Upvotes: 1

Sven
Sven

Reputation: 1326

You assign the slidecontroller to the uiview and then set the rootviewcontroller to your viewcontroller. This means that the slideviewcontroller will only work with the assigned view.

If you want to use the slidecontroller for other viewcontrollers you should do it the other way around and set the rootViewController to the slidecontroller.

Upvotes: 0

Related Questions