1

I'm trying to implement a search bar in my tableview, I'm using Swift Bond to populate the data in my table. Anyone know how to filter the data correctly with Bond?

I'm using the MVVM architecture. I'm doing all my binding in a method being called on viewDidLoad:

    viewModel.students.bind(to: tableView, animated: false) { students, indexPath, tableview in
        let student = students[indexPath.row]

        let cell = tableview.dequeueReusableCell(withIdentifier: R.nib.studentCell.name, for: indexPath) as! StudentCell
        cell.bind(to: student)

        return cell

this allows for my table to be populated with values in students but am unable to think of how to implement the search bar.

I did all the config and delegation but not sure where to go from here.

Shmidt
  • 16,436
  • 18
  • 88
  • 136
superbad09
  • 11
  • 2
  • Hi, and welcome to Stackoverflow! In order to provide a specific answer to your question, please give us some code you're working on, as well as an extended description of the issues you're facing and the desired behavior for your code. – Orlando Nov 22 '17 at 20:21
  • 1
    @Orlando hey is this enough datA? – superbad09 Nov 22 '17 at 20:45
  • @superbad09 Read https://www.raywenderlich.com/149753/bond-tutorial-bindings-swift. – Shmidt Mar 09 '18 at 21:25

0 Answers0