All Projects → nitingeorge227 → Ngsplitmenucontroller

nitingeorge227 / Ngsplitmenucontroller

Menu Driven Split view controller

Projects that are alternatives of or similar to Ngsplitmenucontroller

Chinese Lunar Calendar For Mac
Chinese Lunar Calendar for Mac
Stars: ✭ 150 (+145.9%)
Mutual labels:  menu, menubar
Spotmenu
Stars: ✭ 2,668 (+4273.77%)
Mutual labels:  menu, menubar
React Site Nav
A kick ass site menu powered by styled components inspired by Stripe.
Stars: ✭ 155 (+154.1%)
Mutual labels:  menu, menubar
Yndropdownmenu
✨ Awesome Dropdown menu for iOS with Swift 5.0
Stars: ✭ 1,259 (+1963.93%)
Mutual labels:  menu, menubar
django-menu-generator
A straightforward menu generator for Django
Stars: ✭ 24 (-60.66%)
Mutual labels:  menubar, menu
Vue Dock Menu
⚓Dockable Menu bar for Vue
Stars: ✭ 183 (+200%)
Mutual labels:  menu, menubar
Nocturnal
A Dimness and Night Shift menu bar app for macOS 🌙
Stars: ✭ 199 (+226.23%)
Mutual labels:  menu, menubar
Side Menu.ios
Animated side menu with customizable UI
Stars: ✭ 2,702 (+4329.51%)
Mutual labels:  menu, menubar
ALButtonMenu
A simple, fully customizable menu solution for iOS.
Stars: ✭ 45 (-26.23%)
Mutual labels:  ipad, menu
ContextMenuSwift
A better version of iOS 13 Context Menu
Stars: ✭ 162 (+165.57%)
Mutual labels:  menubar, menu
Radialmenu
A highly customizable radial menu that's very easy to setup.
Stars: ✭ 371 (+508.2%)
Mutual labels:  menu, menubar
WaveSideBar
Animated side bar view
Stars: ✭ 38 (-37.7%)
Mutual labels:  menubar, menu
Superslide.js
A flexible, smooth, GPU accelerated sliding menu for your next PWA
Stars: ✭ 496 (+713.11%)
Mutual labels:  menu, menubar
Otganttchartkit
OTGanttChartKit is gantt chart framework for iOS. This framework use easily like UITableView.
Stars: ✭ 38 (-37.7%)
Mutual labels:  ipad
Debuguisystem
Create a runtime menu system with buttons and windows for debugging in one line of code.
Stars: ✭ 48 (-21.31%)
Mutual labels:  menu
Ftpopovermenu
FTPopOverMenu is a pop over menu for iOS which is maybe the easiest one to use. Supports both portrait and landscape. It can show from any UIView, any UIBarButtonItem and any CGRect.
Stars: ✭ 988 (+1519.67%)
Mutual labels:  menu
Duo Navigation Drawer
A flexible, easy to use, unique drawer library for your Android project.
Stars: ✭ 986 (+1516.39%)
Mutual labels:  menu
Receptionkit
A simple, customizable receptionist iPad app built with Smooch
Stars: ✭ 55 (-9.84%)
Mutual labels:  ipad
Expandablemenu
Expandable Menu button
Stars: ✭ 47 (-22.95%)
Mutual labels:  menu
Electron Create Menu
a default menu for your electron applications, with convenience functions for multiplatform use and i18n.
Stars: ✭ 35 (-42.62%)
Mutual labels:  menu

NGSplitMenuController

This is a menu driven Split view controller for iOS 7 and above.The sidemenu on the left is used to select from the different master views.The third section shows the details corresponding to each master view.

NGSPLITGIF

![NGSPLIT](https://raw.githubusercontent.com/nitingeorge227/NGSplitMenuController/master/Screenshots/iOS Simulator Screen Shot Aug 23, 2015, 12.05.15 AM.png)

Requirements

  • iOS 7.0 or later
  • ARC

Demo

Build and run the Example project in Xcode to see NGSplitMenuController in action.

Usage

All you need to do is drop NGSplitMenu files into your project, and add #include "NGSplitMenu.h" to the top of classes that will use it.

In your AppDelegate's - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions,set the default options to NGSplitViewManager to configure various attributes of the split menucontroller

[[NGSplitViewManager sharedInstance]setDefaultOptions:@{kNGMenuBackgroundColorKey : [UIColor colorWithRed:0.212f green:0.212f blue:0.212f alpha:1.00f],
                                                            kNGMenuItemFontKey             : [UIFont fontWithName:@"HelveticaNeue-Light" size:18.0f],
                                                            kNGMenuItemFontColorKey     :[UIColor whiteColor],
                                                            kNGMenuitemSelectionColorKey        : [UIColor colorWithRed:0.890f green:0.494f blue:0.322f alpha:1.00f],
                                                            kNGMenuSeperatorColorKey  : [UIColor colorWithWhite:0.841 alpha:1.000],
                                                            kNGMenuLineSeperatorKey     : @(NO),
                                                            }];

Create the view controllers and set the master and detail views

MainViewController *mainView = [[MainViewController alloc]init];
MasterViewController *masterView = [[MasterViewController alloc]init];
DetailViewController *detailView = [[DetailViewController alloc]init];
    
[[NGSplitViewManager sharedInstance]setRootViewController:mainView masterViewController:masterView   detailViewController:detailView];
    

Set the menu items

NSMutableArray *menuItems = [NSMutableArray array];
NGMenuItem *menuItem1 = [[NGMenuItem alloc]init];
menuItem1.itemDescription = @"Home";
menuItem1.itemImage = [UIImage imageNamed:@"icon-name"];
[menuItems addObject:menuItem1];
[[NGSplitViewManager sharedInstance]setMenuItems:menuItem];
    
self.window.rootViewController = mainView;

To toggle between the splitviews,use:

[[NGSplitViewManager sharedInstance]toggleMenu];

In MainViewController.m, listen to kMenuItemSelectesNotification for callback on menu item clicks.

[[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(menuItemSelected:) name:kMenuItemSelectesNotification object:nil];

Extract NGMenuItem from the notification using the key kNGMenuItemKey.

Set the master view in MainViewController

- (void)menuItemSelected:(NSNotification*)notification{
    
    NSDictionary *userInfo = notification.userInfo;
    
    NGMenuItem *menuItem = [userInfo objectForKey:kNGMenuItemKey];
    
    if (menuItem) {
        if (menuItem.menuIndex == kHome) {
            [[NGSplitViewManager sharedInstance]setMasterViewController:masterViewController];
        }
    }
}

Set the detail view in MasterViewController

DetailViewController *detail = [[DetailViewController alloc]initWithNibName:@"DetailViewController" bundle:nil];
    [[NGSplitViewManager sharedInstance]setDetailViewController:detail];
    

Author

Nitin George [email protected]

License

NGSplitMenuController is available under the MIT license.

Copyright © 2015 Nitin George.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].