Latest0.4
Homepagehttps://github.com/RidgeCorn/RCDraggableButton
LicenseMIT
Platformsios 5.0, requires ARC
Authors

License MIT
Build Platform
Build Version
Build Status
RCDraggableButton Chat
Stories in Ready

A draggable button that appears in your view.

RCDraggableButton Screenshot1
RCDraggableButton Screenshot2
RCDraggableButton Screenshot3
RCDraggableButton Screenshot4
RCDraggableButton Screenshot5
RCDraggableButton Screenshot6

Note

RCDraggableButton is not ready for production use until version 1.0.

Requirements

  • Xcode 5.0 or higher
  • iOS 5.0 or higher
  • ARC

Demo

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

Installation

CocoaPods

The recommended approach for installating RCDraggableButton is via the CocoaPods package manager.

In your Podfile, add a line shows below:

pod 'RCDraggableButton', '~> 0.1'

Then,

pod update

If you haven’t used CocoaPods before, you should visit CocoaPods for more info.

Manual Install

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.

Example Usage

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.

License

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

Latest podspec

{
    "name": "RCDraggableButton",
    "version": "0.4",
    "summary": "A draggable button that appears in your view.",
    "homepage": "https://github.com/RidgeCorn/RCDraggableButton",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Looping": "[email protected]"
    },
    "platforms": {
        "ios": "5.0"
    },
    "source": {
        "git": "https://github.com/RidgeCorn/RCDraggableButton.git",
        "tag": "0.4"
    },
    "source_files": "Src",
    "public_header_files": "Src/*.h",
    "requires_arc": true
}

Pin It on Pinterest

Share This