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!
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.
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
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.
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?
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?
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! :]