Implementing 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, we'll explore 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, making it even easier to implement drag and drop in certain apps.