UA-17470720-3

Jump to content


Photo
- - - - -

Search Using searchPropertyName


  • Please log in to reply
1 reply to this topic

#1 designwerks

designwerks

    Advanced Member

  • STV 5.0 Std
  • PipPipPipPipPip
  • 141 posts
  • LocationKingsville, Ontario, Canada
Reputation: 23
Excellent

Posted 02 May 2014 - 03:13 AM

Programmers...

 

I have been trying to implement my first search function. 

 

Notes:

 

I am using a SCViewController to display the result

 

I have a unique categoryModel but since all the code is using the default searchBar all the functionality works except it does NOT search for the name, category or location. 

 

self.tableViewModel = categoryModel;

 

categoryModel.searchPropertyName = @"name;category;location.title";

    

    self.searchBar.delegate = self;

 

 

Any ideas how to code the self.searchbar.delegate = self to include the categoryModel?

 

I've tried

 

categoryModel.searchBar = self.searchBar;

 

But then the functionality of the search bar no longer functions...

 



#2 designwerks

designwerks

    Advanced Member

  • STV 5.0 Std
  • PipPipPipPipPip
  • 141 posts
  • LocationKingsville, Ontario, Canada
Reputation: 23
Excellent

Posted 02 May 2014 - 03:22 AM

Or I could live with learning how to release the keyboard once the user touches the "Search" button on the keyboard.  Currently, it simply sits there and does not disappear.

 

-(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar

 

{

 

    [self.tableViewModel reloadBoundValues];

    [self.tableViewModel.tableView reloadData];

    [[[UIApplication sharedApplication] keyWindow] endEditing:YES];

    

}

 

But again, because I am trying to use categoryModel this does not fire either...






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users