TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Dec 2014 |
Maintained by Looping.
A draggable button that appears in your view.
RCDraggableButton is not ready for production use until version 1.0.
In your terminal,
cd [projdir]/RCDraggableButtonDemo
pod install
After a cup of tea, you should be able to build and run the RCDraggableButtonDemo
project by open RCDraggableButtonDemo.xcworkspace
in Xcode5.
open RCDraggableButtonDemo.xcworkspace
All you need to do is drop Src
files into your project, and add #include "RCDraggableButton.h"
to the top of classes that will use it.
In your AppViewController's - (void)viewDidLoad
create draggableButton and add it to keyWindow or customView.
// Set view as nil, means add button to keyWindow
RCDraggableButton *draggableButton = [[RCDraggableButton alloc] initInView:nil WithFrame:CGRectMake(120, 120, 60, 60)];
// Or add button to customView that you set in -init method
UIView *customView = ...;
[self.view addSubview:customView];
RCDraggableButton *avatar = [[RCDraggableButton alloc] initInView:customView WithFrame:CGRectMake(120, 120, 60, 60)];
You can also use it manually:
RCDraggableButton *draggableButton = [[RCDraggableButton alloc] initWithFrame:CGRectMake(0, 100, 60, 60)];
[self.view addSubview:draggableButton];
For more usage example, please look up the demo project in RCDraggableButtonDemo
, or the source files in Src
.
RCDraggableButton is available under the MIT license. See the LICENSE file for more info.