Construct An NSPredicate Without Using Strings And Use it To Filter An NSArray
Daily Coding Tip 082

This is a simple way to use NSPredicate
without needing to construct a format string.
It’s possible to construct NSPredicate
using a closure, which means I can also pass it data from computed properties.
I have a person structure here which conforms to Identifiable
, allowing me to display it in a ForEach
later. This just m…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.