GitXplorerGitXplorer
r

TXDragAndDrop

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
c8b7bebde3ebcc692fa2fe62d6392853df15002f

Bug fix

rrtoshiro committed 9 years ago
Unverified
4a3b98162e35a8f3c860b183f37251657233dba6

Bug fix

rrtoshiro committed 9 years ago
Unverified
a947596d0dfe833a75f75fa8e11537669a67f958

Bug fix

rrtoshiro committed 9 years ago
Unverified
6d80dca16c46d713061832a8a5f4bbcf5ceea791

- Spec updated

rrtoshiro committed 9 years ago
Unverified
0d9defb6963e66f986268fe79329d8bb1349826f

- Metadata update

rrtoshiro committed 9 years ago
Unverified
f1231ab43185f9a8b4ca866f05d4ee76cf7160c6

- Bug fix

rrtoshiro committed 9 years ago

README

The README file for this repository.

TXDragAndDrop

Usage

Call setDraggingEnabled: to make a UIView draggable.

You can restrict the dragging area throught setDraggingEdgeInsets:.

As Apple API docs said:

Positive values cause the frame to be inset (or shrunk) by the specified amount. Negative values cause the frame to be outset (or expanded) by the specified amount.

So, if you want to make UIView draggable to the left, restricting top and bottom, you can set your UIEdgeInsets as:

[self.myview setDraggingEdgeInsets:UIEdgeInsetsMake(0.f, -self.myview.frame.size.width, 0.f, 0.f)];

API

- (void)setDraggingEnabled:(BOOL)draggingEnabled;
- (BOOL)isDraggingEnabled;

- (void)setDraggingEdgeInsets:(UIEdgeInsets)edgeInsets;
- (UIEdgeInsets)draggingEdgeInsets;

Installation

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

pod "TXDragAndDrop"

License

Copyright (c) 2015 Toshiro Sugii

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.