Im building an app where users will be able to filter through a set of photos based on 4 parameters:
param1 and param2 can be one of three possible values respectively. param3 and param4 can contain multiple 'tags' if you will that describe the photo. I have the ui setup where for param1/param2 a series of uiswitches represents each of the three chooses for each param. If you turn one value on, the other two will turn off. However all off should return all photos assuming no values for param3 or param4 are set
Params3/4 have UiButtons that can be made selected/normal. Any selected should be added to the filtering to narrow results.
I can't seem to figure out how I should write the filtering logic to be most effective. Essentially on any control change, I need to rewrite the predicate filter but I can't seem to wrap my head around how I can link the separate param filters together.
For param3/4 I'd also like to add a disabled state for uibuttons that have no records, or no records based on the currently selected buttons.
Can anyone help point me in the right direction?