You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
I often run into use cases where I need to pre-populate a fake document in order to simulate a row of data in my table view (built using CouchUITableSource):
a) either, because I want to show the user what sort of interaction they can have with the given view,
b) or, because the table row is actually an action siting with the rest of the data rows, which seems to be a popular way to work these days (Any.Do app)
I have written a very simple patch which allows developers to provide CouchUITableSource with a property doNotDeleteProperty and gain document-level control over which rows may or may not be deleted.
If my document model has the property -[CouchModel setMustStickAround:] then:
a) setting that to true on only the objects that should NOT be deleted, and
b) letting CouchCocoa know about which property to monitor -[CouchUITableSource setDoNotDeleteProperty:@"mustStickAround"] ... will do the job.
The text was updated successfully, but these errors were encountered:
This sounds good, but I'm at the point now where I'm trying to keep the size of the core code down (it's getting near 500k on iOS.) Maybe you could refactor this into a subclass, and we could publish this somewhere as an optional extension people could add to their app projects?
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I often run into use cases where I need to pre-populate a fake document in order to simulate a row of data in my table view (built using CouchUITableSource):
a) either, because I want to show the user what sort of interaction they can have with the given view,
b) or, because the table row is actually an action siting with the rest of the data rows, which seems to be a popular way to work these days (Any.Do app)
I have written a very simple patch which allows developers to provide CouchUITableSource with a property
doNotDeleteProperty
and gain document-level control over which rows may or may not be deleted.https://gist.github.com/4702055
If my document model has the property
-[CouchModel setMustStickAround:]
then:a) setting that to
true
on only the objects that should NOT be deleted, andb) letting CouchCocoa know about which property to monitor
-[CouchUITableSource setDoNotDeleteProperty:@"mustStickAround"]
... will do the job.The text was updated successfully, but these errors were encountered: