Latest 0.5.0
Homepage https://github.com/abouzek/ABMinimalMenu
License MIT
Platforms ios 7.1, requires ARC
Authors

Version
License
Platform

Description

A simple menu with easily customizable animations and an easy to use interface. ABMinimalMenu provides a simple form of menu navigation which can be tailored to many use cases.

Example

alt tag

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

The main menu item will always be showing. Selecting this item will roll out the menu items. Currently, ABMinimalMenu will rotate the image specified in the constructor 180 degrees on ABMinimalMenu open and close. The main item should be created using the ABMinimalMenuMainItem initializer:

-(instancetype)initWithSize:(CGSize)size
                      color:(UIColor *)color
                      image:(UIImage *)image;

Each menu item can either display a static image, just a background color, or both. Create each menu item with the ABMinimalMenuItem initializers specified in ABMinimalMenuItem.h. For example, to create an item with both an image and background color, use:

-(instancetype)initWithSize:(CGSize)size
                      color:(UIColor *)color
                      title:(NSString *)title
                       font:(NSFont *)font
                  textColor:(UIColor *)textColor
                      image:(UIImage *)image;

where the title, font and textColor attributes control the appearance of the item’s optional inline label.

An instance of ABMinimalMenu should be created using the initializer:

-(instancetype)initWithFrame:(CGRect)frame
                      center:(CGPoint)center
                    mainItem:(ABMinimalMenuMainItem *)mainItem
                       items:(NSArray *)items
                    delegate:(id<ABMinimalMenuDelegate>)delegate;
  • The items NSArray should contain instances of ABMinimalMenuItem.

  • Center is the center point of the main menu item.

To respond to menu item selection, open and close events, and customize animations, implement the ABMinimalMenuDelegate protocol. For animation customization, use:

-(CGAffineTransform)minimalMenu:(ABMinimalMenu *)menu rolloutTransformForItemAtIndex:(NSUInteger)index;
-(CGAffineTransform)minimalMenu:(ABMinimalMenu *)menu selectTransformForItemAtIndex:(NSUInteger)index;
-(CGAffineTransform)minimalMenuSelectTransformForMainItem:(ABMinimalMenu *)menu;

and for other events, see the protocol definition in ABMinimalMenu.h.

Installation

ABMinimalMenu is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "ABMinimalMenu"

Author

Alan Bouzek, github: abouzek, [email protected]

License

ABMinimalMenu is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "ABMinimalMenu",
    "version": "0.5.0",
    "summary": "A simple menu with easily customizable animations and an easy to use interface.",
    "description": "A simple menu with easily customizable animations and an easy to use interface. ABMinimalMenu provides a simple form of menu navigation which can be tailored to many use cases.",
    "homepage": "https://github.com/abouzek/ABMinimalMenu",
    "license": "MIT",
    "authors": {
        "abouzek": "[email protected]"
    },
    "source": {
        "git": "https://github.com/abouzek/ABMinimalMenu.git",
        "tag": "0.5.0"
    },
    "platforms": {
        "ios": "7.1"
    },
    "requires_arc": true,
    "source_files": "Pod/Classes/**/*",
    "resources": [
        "Pod/Assets/*.png"
    ],
    "resource_bundles": {
        "ABMinimalMenu": [
            "Pod/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This