Let me know about posting the project, but I think I've narrowed it down to the specific snippet that causes the problem.
If, let's say I add an item to items and want it to show up in the view, I can just do:
filteredItems = items
...and everything works great.
But part of the functionality is that the field for entering a new item title to create it searches existing items and shows only matches, and I've simplified that search down to:
var tempItems = items
if newText == "" {
// NSLog("No filtertext. Items: \(items.count)")
} else {
tempItems = tempItems.filter {
$0.title.lowercased().contains(newText.lowercased())
}
}
filteredItems = tempItems
...and if that runs and reduces the size of the list, it's fine. But if it runs again and the size increases again, then everything goes crazy.
So imagine you have three items, The King, The Queen, and The Jack. If you search on "the", it doesn't reduce the list at all, so if you were to either add a new item just called "the", it'd be fine, and it would also be fine if you deleted that filter.
However, if you typed the letter "i", the list would be reduced to "The King", and if you deleted that "i" filter, the full list would return, but the returned items would be non-responsive.
Heeeelllllp?