I have a nstableview. I would like to filter the results based on the characters entered in a search bar in OSX. So how do i bind the table view and the search field in OSX not in IOS? :) Thanks.
I have a project that you can download and look how it works.
The steps are as :
Drag NSArrayController, set all bindings with this. Create NSSearchField.
In binding inspector, Search "Bind to ArrayController".
Set Controller Key to "filterPredicate".
Set Predicate Format to "property1 contains $value" If you want a single search field to search on multiple values(say 3) use || as : "property1 contains $value || property2 contains $value || property3 contains $value"
Also, this StackOverFlow Question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With