Half screen image, iOS sidebar menu

How I want to display the number of menus on the left side of the screen, like the following: this is a new Facebook application. When you click on the panel shown as a red square around it, a list appears on the left side in the picture after sliding the right side in my application there is some kind of sdk to add this. Please help me.

enter image description here

+8
iphone ios6
source share
5 answers

Just look

https://github.com/BenHall/ios_facebook_style_navigation

You will find many ways to do this. Choose any user to suit your needs.

+8
source share

The guys from Facebook did a brilliant job in the new version of the application. A similar open source can be found in here -

This shows a technique that makes a split look for the iPhone.

Edit: several other open source:

Source 1
Source 2
Source 3
Source 4
Source 5
Source 6
Source 7
Source 8
Source 9
Source 10
Source 11

+3
source share

No, there is no SDK for this. You can do this in two ways.

  • Using two UIViewController
  • Using two UIView.

I recommend the second because I used it and it works fine.

For the first approach, you will find an example and demo on github.com.

let me briefly talk about how I implemented it using two UIView.

Your regular content will be the default UIView, and the slide controls will be displayed in the second mode.

By default, the normal UIView will be visible, and the UIView slider will be at -x pos, something like (-200,0,200,320) set this according to your needs.

When you click the show / hide button, change its frame property so that the normal UIView slide is the right side 200 pt and the UIView slider will appear on the screen.

Let me show some code to hide / show:

[UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.5]; view.frame = CGRectMake(250, view.frame.origin.y, view.frame.size.width, view.frame.size.height);; slideView.frame = CGRectMake(0, view.frame.origin.y, 250, view.frame.size.height);; [UIView commitAnimations]; 

The parameter in CGRectMake can be any according to what you want.

To implement this, create a subclass of UIView. and add a UITableView if you want to look like facebook.

Update:

When looking for a new implementation, I found a wonderful work on this concept by one developer. If someone is thinking of adding this feature, you should visit it once: MMDrawerController

All the best

+3
source share

You can use the InteractiveSideMenu library. It supports an interactive open / close menu. It supports an interactive menu of opening and closing and after configuration:

  • Animation duration
  • Visible Content Width
  • Content Scale
  • Using spring animations with setting options
  • Animation options such as an animation curve

You have to use 3 main ViewControllers to subclass to implement your side menu.

  • MenuContainerViewController is the host for viewing menus and content
  • MenuViewController - a container for presenting menus
  • MenuItemContentControlller is a container for content corresponding to a menu item

To set up your side menu, you have to do 3 things:

  • Ensure the implementation of the MenuViewController base and assign the MenuViewController property to it
  • Provide implementation of menu content and allocation of an array of content controllers in the contentViewControllers property
  • Select the initial content controller by calling selectContentViewController(_ selectedContentVC: MenuItemContentViewController)

Here is an example of host controller configuration.

 import InteractiveSideMenu class HostViewController: MenuContainerViewController { override func viewDidLoad() { super.viewDidLoad() self.menuViewController = self.storyboard!.instantiateViewController(withIdentifier: "NavigationMenu") as! MenuViewController self.contentViewControllers = contentControllers() self.selectContentViewController(contentViewControllers.first!) } private func contentControllers() -> [MenuItemContentViewController] { //here is instantiation of content view controllers } } 

You can find more details in the example here .

+3
source share

This is good and simple example for implement it

Click the following link to get it https://github.com/nverinaud/NVSlideMenuController

0
source share

All Articles