简体   繁体   English

ios拖放库

[英]ios drag and drop library

I am looking for any libraries that exist to allow drag and drop functionality like the tracks in Garage Band on iPad. 我正在寻找任何存在的库,以允许拖放功能,如iPad上的Garage Band中的轨道。 Does anybody know of good library (open source or commercial) that exist. 有没有人知道存在的好图书馆(开源或商业)。

At Oblong we created a self-contained iOS Drag and Drop library that can work across arbitrary views, and have made it public on github: 在Oblong,我们创建了一个独立的iOS Drag and Drop库,它可以在任意视图中工作,并在github上公开:

https://github.com/Oblong/OBDragDrop https://github.com/Oblong/OBDragDrop

If you find it useful or have specific areas of enhancements you need, go ahead and let me know! 如果您发现它有用或具有您需要的特定增强功能,请继续告诉我们!

I have also made my own static library (I had no idea about OBDragDrop) 我也创建了自己的静态库(我不知道OBDragDrop)

https://github.com/jmos/JCMDragging (compile with ARC) https://github.com/jmos/JCMDragging (用ARC编译)

The library mirrors common UIKit patterns so the bulk of the interfaces are actually categories on UIKit classes: 该库镜像了常见的UIKit模式,因此大部分接口实际上是UIKit类的类别:

  • Dragging events are handled and forwarded by UIResponder 拖动事件由UIResponder处理和转发
  • Dragging events are delivered according to hitTest:withDrag: and pointInside:withDrag: 拖动事件根据hitTest传递:withDrag:和pointInside:withDrag:
  • Data transfer uses [UIPasteboard draggingPasteboard] and [UIResponder drag:/drop:] 数据传输使用[UIPasteboard draggingPasteboard]和[UIResponder drag:/ drop:]

The only concrete class is the gesture recogniser. 唯一具体的类是手势识别器。 There are no managers or initialisation. 没有经理或初始化。

Have a look at the sample project to see how to use it. 查看示例项目以了解如何使用它。

EDIT: I have added a readme file now. 编辑:我现在添加了自述文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM