Latest 0.1.0
Homepage https://github.com/canicelebrate/AERightMenuWindow
License MIT
Platforms ios 8.0
Dependencies PureLayout
Authors

A generic approach for iOS to show view controller as side right menu and inspired by 唐巧 who is the author of the book <iOS进阶开发>. You can find some usable knowledge about UIWindow from chapter 12 of the book.

Implementation

Utilize UIWindow to show a view controller as a right side menu. You can specify the width percentage of menu view related to the full screen.
Also, you can set the dropback color(normally it’s a semi-transparent color) and the animation duration for showing the side menu.

Setup

Using CocoaPods

  1. Add the pod AERightMenuWindow to your Podfile.

    pod 'AERightMenuWindow'
  2. Run pod install from Terminal, then open your app’s .xcworkspace file to launch Xcode.
  3. Import the AERightMenuWindow.h umbrella header.
    • Objective-C: #import "AERightMenuWindow.h"

That’s it – now go write a menu with AERightMenuWindow!

Usage

Sample Code (Objective-C)

AERightMenuWindow simplifies writing right side menu layout in you app. Let’s take a quick look at an example,

Here’s a view controller loaded from storyboard and it utilizes AERightMenuWindow to display itself as a right side menu in a designated window.

// Step 1: Create your controllers.
UIStoryboard *mainStoryboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
MenuViewController *frontController = [mainStoryboard instantiateViewControllerWithIdentifier:@"MenuViewController"];

// Step2: Customize by define your own options
AERightMenuWindowOptions* options = [[AERightMenuWindowOptions alloc] init];
[options setDropBackColor:kAERightMenuWindowDropBackColor];
[options setAnimationInterval:kAERightMenuWindowAnimationInterval];
[options setMenuViewWidthPercentageOfFullScreen:0.80f];
[[AERightMenuWindow instance] setOptions:options];

// Step3: Show side menu
[[AERightMenuWindow instance] showMenu:frontController];

Meta

Originally designed & built by William (@canicelebrate). Distributed with the MIT license.

Latest podspec

{
    "name": "AERightMenuWindow",
    "version": "0.1.0",
    "summary": "A generic approach to show view controller as side right menu in iOS",
    "description": "Utilize UIWindow to show a view controller as a right side menu. You can specify the width percentage of menu view related to the full screen.nAlso, you can set the dropback color(normally it's a semi-transparent color) and the animation duration for showing the side menu.",
    "homepage": "https://github.com/canicelebrate/AERightMenuWindow",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "William Wang": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/canicelebrate/AERightMenuWindow.git",
        "tag": "0.1.0"
    },
    "source_files": "RightMenuCore/*.{h,m}",
    "dependencies": {
        "PureLayout": []
    }
}

Pin It on Pinterest

Share This