0

I am using a UISearchDisplayController the default way to filter the cells of a UITableViewController by its text values (e.g. to show only the cells which start with the letters 'ab'). The values in the cells of the table view are filled by a NSFetchedResultsController.

In addition to this text based filtering, I would like to add additional filtering capabilities based on the numeric range of the items (e.g. I am currently filtering by the name of persons and would like to apply an additional filter to show only those persons in the range specified).

For this reason I can't use the default search scope buttons, but would need to add additional views and buttons, e.g. for filtering by age (Age > 18 and Age < 35: one label and two text fields).

What would be the recommended view to add additional labels and text fields to an existing UISearchDisplayController (if possible in combination with its default UISearchDisplayDelegate) in your view?

Thank you!

AlexR
  • 5,514
  • 9
  • 75
  • 130
  • wt u want ??filter data UITextField base or UISearchDisplayController base ???????????? – iPatel Feb 23 '13 at 15:34
  • Why can't you use the search scope buttons? If you only have 2, 3, or 4 age options, then using the buttons is perfect. – rmaddy Feb 23 '13 at 15:49
  • Wouldn't I need three text fields (one for the name, two for the age range)? When using the scope buttons they refer to the same text field (?). – AlexR Feb 23 '13 at 15:51
  • I might misunderstand your need but you use the standard search text field as you are now. Then you use the scope buttons to limit the age. Using the scope buttons assumes the age ranges are fixed. If you want the user to be able to enter the exact age range then the scope buttons won't work. – rmaddy Feb 23 '13 at 16:02
  • Yes, I would like to allow the user to enter exact ranges. Would I need to add a separate filter view to the search display controller to contain the extra buttons and text fields? – AlexR Feb 23 '13 at 16:08

0 Answers0