# How To Make a Gesture-Driven To-Do List App Like Clear in Swift: Part 2/2

**URL:** <https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833>\
**Category:** 🎓 Courses & Articles\
**Created:** [March 4, 2016, 11:42am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833 "2016-03-04T11:42:21Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [March 4, 2016, 11:42am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/1 "2016-03-04T11:42:21Z")

</div>

Learn how to make a gesture-driven to-do list app like Clear, complete with table view tricks, swipes, and pinches.

* * *
 This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/2152-how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2](https://www.raywenderlich.com/2152-how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2)

---

<div class="post-metadata">

**Author:** ![ys\_xs](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/ys_xs/32/105896_2.png) [@ys\_xs](https://forums.kodeco.com/u/ys_xs)\
**Post date:** [April 6, 2016, 2:07pm UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/2 "2016-04-06T14:07:31Z")

</div>

great! thanks for your share!!!

---

<div class="post-metadata">

**Author:** ![dipnv](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/dipnv/32/31637_2.png) [@dipnv](https://forums.kodeco.com/u/dipnv)\
**Post date:** [April 29, 2016, 1:59am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/3 "2016-04-29T01:59:45Z")

</div>

tks Ms. Audrey Tam, yr guide is really useful. Many tks. 👍

---

<div class="post-metadata">

**Author:** ![blackhawk4152](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/blackhawk4152/32/34075_2.png) [@blackhawk4152](https://forums.kodeco.com/u/blackhawk4152)\
**Post date:** [June 10, 2016, 11:59am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/4 "2016-06-10T11:59:50Z")

</div>

Great tutorial! Just one thing, when we continuously drag the scrollview up and down, the second time we drag it, there will be no placeholderCell appearing. To fix that, all we need to do is change  
`pullDownInProgress = false` to `pullDownInProgress = scrollViewContentOffsetY <= 0.0 ? true : false`  
at the end of the `scrollViewDidScroll` method to continuously monitor for behavior change.  
Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![johnantoni](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/johnantoni/32/35485_2.png) [@johnantoni](https://forums.kodeco.com/u/johnantoni)\
**Post date:** [June 27, 2016, 2:55am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/5 "2016-06-27T02:55:22Z")

</div>

Excellent tutorial.

P.S. In case anyone needs it I managed to upgrade to codebase to Swift 2.2 & iOS 9.3, source code available here:

> **[GitHub - johnantoni/clearstyle: clearstyle swift ios todo app](https://github.com/johnantoni/clearstyle)**
>
> clearstyle swift ios todo app. Contribute to johnantoni/clearstyle development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![mjmiski](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mjmiski/32/50027_2.png) [@mjmiski](https://forums.kodeco.com/u/mjmiski)\
**Post date:** [September 30, 2016, 12:51am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/6 "2016-09-30T00:51:47Z")

</div>

I am missing an obvious point here, but when I close the app, the todo list reverts to the hardcoded elements. How do I save the changes on the device so that they can be updated after a power cycle or after the app closes out. I may be having an exit problem, but I cant see it in debugging.

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [September 30, 2016, 4:10am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/7 "2016-09-30T04:10:45Z")

</div>

hi mjmiski, the sample app doesn’t save the user’s data. Our site has an old tutorial about NSCoding, and a video series about saving data. Or look at Apple’s getting-started sample at [Apple Developer Documentation](https://developer.apple.com/library/content/referencelibrary/GettingStarted/DevelopiOSAppsSwift/Lesson10.html)

Note that you don’t need to write `encodeWithCoder` etc, as the archiver knows how to encode an array of String.

There are tutorials from other sites online: google NSCoding, saving data or persisting data.

---

<div class="post-metadata">

**Author:** ![mjmiski](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/mjmiski/32/50027_2.png) [@mjmiski](https://forums.kodeco.com/u/mjmiski)\
**Post date:** [September 30, 2016, 5:20pm UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/8 "2016-09-30T17:20:24Z")

</div>

Thx audrey. Funny found the apple example right after my post. But like your guys tools a lot better. Thx again.

---

<div class="post-metadata">

**Author:** ![magero](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/magero/32/50222_2.png) [@magero](https://forums.kodeco.com/u/magero)\
**Post date:** [December 2, 2016, 1:43pm UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/9 "2016-12-02T13:43:03Z")

</div>

Hi there, its a great tutorial, help me a lot. Question, it is possible upgrade the tutorial with save function, that data in the list stay saved?  
Thx

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [December 3, 2016, 4:27am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/10 "2016-12-03T04:27:49Z")

</div>

that’s outside the scope of this tutorial, but you can do it yourself — see my post, just 2 up from yours.

---

<div class="post-metadata">

**Author:** ![francois\_soft](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/francois_soft/32/81494_2.png) [@francois\_soft](https://forums.kodeco.com/u/francois_soft)\
**Post date:** [May 4, 2017, 9:20am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/11 "2017-05-04T09:20:14Z")

</div>

Thanks for this tutorial!  
I tried to follow it using Xcode 8.3.2 (swift 3, target iOS 10.3). Everything works fine until I change the Labels to TextFields.  
Then the scroll doesn’t work anymore. Slide left to delete and slide right to complete still work, but scroll down (or up) the todo list does not work.  
Perhaps the text fields “keep” the slide/pan gesture for themselves and do not send them to the parent view, but I can’t figure out how to resolve this issue.  
Anyone tried with this version of Xcode ? Do you have the same behavior or did I make a mistake somewhere?

---

<div class="post-metadata">

**Author:** ![audrey](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/audrey/32/111607_2.png) [@audrey](https://forums.kodeco.com/u/audrey)\
**Post date:** [May 8, 2017, 12:59am UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/12 "2017-05-08T00:59:06Z")

</div>

does the keyboard appear when you try to scroll? maybe make the text field not the full width of the cell, so you have room to touch the cell without making the text field first responder?

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [November 16, 2017, 11:32pm UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/13 "2017-11-16T23:32:53Z")

</div>

This tutorial is more than six months old so questions are no longer supported at the moment for it. We will update it as soon as possible. Thank you! :]

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [November 16, 2017, 11:32pm UTC](https://forums.kodeco.com/t/how-to-make-a-gesture-driven-to-do-list-app-like-clear-in-swift-part-2-2/6833/14 "2017-11-16T23:32:55Z")

</div>

Closed on November 16, 2017, 11:32pm UTC


