Implementing a basic drag and drop functionality

The previous section explained how drag and drop works from a theoretical point of view. This section focuses on implementing drag and drop in a sample app. First, you will learn how a simple, regular implementation of drag and drop might work. Next, you'll see how Apple has implemented drag and drop for UICollectionView and UITableView. These two components have received special treatment for drag and drop, making it even easier to implement drag and drop in apps that use these components.