dra

DragAndDropTableView

A UITableView where cells can be rearranged by drag and drop.

Showing:

Popularity

Downloads/wk

0

GitHub Stars

54

Maintenance

Last Commit

6yrs ago

Contributors

9

Package

Dependencies

0

License

MIT

Categories

Readme

DragAndDropTableView

DragAndDropTableView is a UITableView which supports drag and drop reordering of table cells.

Installation

Manual

  • Download sources and add the DragAndDropFolder to your project
  • Make sure the QuartzCore framework is added to your project
  • Create a DragAndDropTable and start dragging and dropping

CocoaPods

pod 'DragAndDropTableView', '~> 0.1'

Usage

DragAndDropTableView operates the same way your standard UITableView does except for a few added protocols.

@protocol DragAndDropTableViewDataSource <NSObject>
@optional
-(BOOL)canCreateNewSection:(NSInteger)section;
@end
@protocol DragAndDropTableViewDelegate <NSObject>
@optional
-(void)tableView:(DragAndDropTableView *)tableView willBeginDraggingCellAtIndexPath:(NSIndexPath *)indexPath placeholderImageView:(UIImageView *)placeHolderImageView;
-(void)tableView:(DragAndDropTableView *)tableView didEndDraggingCellAtIndexPath:(NSIndexPath *)sourceIndexPath toIndexPath:(NSIndexPath *)toIndexPath placeHolderView:(UIImageView *)placeholderImageView;
-(CGFloat)tableView:(DragAndDropTableView *)tableView heightForEmptySection:(int)section;
@end

As you can see all methods are optional. If you choose to implement the protocols the UITableViewDataSource used by your table should implement the DragAndDropTableViewDataSource protocol and your UITableViewDelegate should implement the DragAndDropTableViewDelegate protocol.

See the example project for further help.

Contact

If you are using DragAndDropTableView I would love to hear about it. Send me a ping on Twitter

Licence

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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100