[](https://travis-ci.org/Raditya Kurnianto/RWDraggableMenu)
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.
To run the example project, clone the repo, and run pod install
from the Example directory first.
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]];
// Use delegate to add custom action if user tap one of your buttons
- (void)RWSubMenuTapAtIndex:(NSInteger)index {
NSLog(@"RWSubMenuTapAtIndex : %ld", index);
}
iOS 7+
RWDraggableMenu is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "RWDraggableMenu"
Raditya Kurnianto, [email protected]
RWDraggableMenu is available under the MIT license. See the LICENSE file for more info.