Building a Trello-like iOS App with Drag & Drop API

Alfian Losari
AppCoda Tutorials
Published in
13 min readJan 13, 2019

--

Kanban Board with Drag & Drop iOS API

You can also read this article in my Xcoding With Alfian blog website using the link below.

Drag & Drop is the user interaction that works naturally when we want to build an app where user can move data around the screen. It’s being used heavily by apps like Trello, Jira, and many others to move data between boards.

Building an iOS app with drag & drop interaction before the release of iOS 11 SDK was not a straightforward process. In my previous experience, there were several tedious tasks that we have to perform manually, such as:

  1. Add a long press gesture recognizer to the view that we want to drag.
  2. Create a snapshot view when user begins to drag.
  3. Handle updating of the dragged snapshot coordinate as user drag the snapshot around the screen.
  4. Detect and handle when the user drops the item into a coordinate location.
  5. Sync the dropped data destination and dragged data source, then update the UI respectively.

--

--

Alfian Losari
AppCoda Tutorials

Mobile Developer and Lifelong Learner. Currently building super app @ Go-Jek. Xcoding with Alfian at https://alfianlosari.com