Skip to content

A draggable menu that behave like iOS assistive touch

License

Notifications You must be signed in to change notification settings

radityaK/RWDraggableMenu

Repository files navigation

RWDraggableMenu

[![CI Status](http://img.shields.io/travis/Raditya Kurnianto/RWDraggableMenu.svg?style=flat)](https://travis-ci.org/Raditya Kurnianto/RWDraggableMenu) Version License Platform

RWDraggableMenu is a draggable button with iOS assistive touch behavior. It can expand and collapse to reveal the menus. RWDraggableMenu is a subclass of UIView.

Usage

Podfile

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

Implementation

Use this line to import the RWDraggable menu #import "RWDraggableMenu.h" then instantiate the class using the following command :

// Supplied a set of icon for your draggable menu`
NSArray *iconsArray = @[@"drag-icon", @"comment-icon", @"share-icon", @"copy-icon", @"bookmark-icon"];`

// Create the draggable menu and add it as a subview
RWDraggableMenu * dragMenu = [[RWDraggableMenu alloc] init];
dragMenu.delegate = self;
[self.view addSubview:[dragMenu setupDragMenuInView:self.view width:70 height:70 backgroundColorRed:51/255.0 green:102/255.0 blue:153/255.0 alpha:0.5 icons:iconsArray]];

Delegate

// Use delegate to add custom action if user tap one of your buttons
- (void)RWSubMenuTapAtIndex:(NSInteger)index {
    NSLog(@"RWSubMenuTapAtIndex : %ld", index);
}

Screenshots

Screenshot 1 Screenshot 2

Requirements

iOS 7+

Installation

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

pod "RWDraggableMenu"

Author

Raditya Kurnianto, [email protected]

License

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

About

A draggable menu that behave like iOS assistive touch

Resources

License

Stars

Watchers

Forks

Packages

No packages published