Reputation: 273
I have an app that has Uicollection view and each cell contains loads of details like username, location, availability date, price. So i want users to have the option to filter results according to their needs like search bar or text field for the selected date, another for location and other for price. and that means that i have to have multiple search bar or textfields my problem is that i know how to make Single search bar but i don't know how to make multiple. Any help would be very appericiated.
Upvotes: 0
Views: 73
Reputation: 2668
you outlet UISearchBars
to your UIViewController
and then in delegate functions
func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
if searchBar == self.searchBar1 {
//first search bar used
} else if searchBar == self.searchBar2 {
...
}
Upvotes: 1