Welcome, Guest
Username Password: Remember me

UISearchDisplayController / UISearchBar
(1 viewing) (1) Guest

TOPIC: UISearchDisplayController / UISearchBar

UISearchDisplayController / UISearchBar 1 year, 7 months ago #1

Hello again,

I need to implement a UISearchDisplayController with a UISearchBar into a project using Sensible TableView.

Generally a UISearchDisplayController is very convenient — you just have to create an NSMutableArray, implement two delegate methods and fill this NSMutableArray according to the user's search term.

This array has to be passed to the table view so that the table view can show the search results.

How to achieve that with STV?
I now have a UISearchDisplayController up running which also fills a NSMutableArray. I "just" don't know how to tell STV that it should use this array. Currently I'm using a SCArrayOfObjectsSection with data from a SCClassDefinition (Core Data).

Can I "replace" the Simple TableView's data source (easily)?

Thanks,
Patrick
  • Patrick
  • OFFLINE
  • Senior Boarder
  • Posts: 49
  • Karma: 3

Re: UISearchDisplayController / UISearchBar 1 year, 7 months ago #2

Hey Patrick,

I think search should be made as easy as any other aspect of Sensible TableView. What we will do is that we'll create an SCArrayOfItemsModel (superclass of SCArrayOfObjectsModel) property called "displaySearchBarInHeaderView". When this property is set to TRUE, all the search functionality will be automatically available without requiring you to do any additional work.

Is ten days a good time frame for you to have this feature added? Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: UISearchDisplayController / UISearchBar 1 year, 7 months ago #3

Wow, that would be absolutely awesome!

But as the cells may represent a object it would be important that the search would consider all object properties, even if they are not displayed in the cell itself.

When you have a object representing a name and a phone number and the cell displays the name, the search should also be able to find the dataset when the user types the phone number belonging to the name.

I hope that will be possible as well.

Ten days are a very good time frame, thank you.
  • Patrick
  • OFFLINE
  • Senior Boarder
  • Posts: 49
  • Karma: 3
Last Edit: 1 year, 7 months ago by Patrick.

Re: UISearchDisplayController / UISearchBar 1 year, 7 months ago #4

We will have a property called something like "searchPropertyName" which you can set to whatever property you want the search to happen on (will automatically default the the class definition's titlePropertyName). If you want the search to happen on more than one property name at the same time, you'll be able to separate the names using semi-colons (e.g. searchPropertyName = @"firstName;lastName").

Thanks a lot for your feedback Patrick!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: UISearchDisplayController / UISearchBar 1 year, 6 months ago #5

Hi,

Has there been any progress on this search functionality. Looking forward to to integrate it soon !

Thanks
  • monsta
  • OFFLINE
  • Expert Boarder
  • Posts: 130
  • Karma: 2

Re: UISearchDisplayController / UISearchBar 1 year, 6 months ago #6

Hi Phil,

We're having our next minor release on Fri, and will include this update amongst other updates and fixes. I will update you guys as soon as it's available. Thanks!
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
Time to create page: 0.92 seconds