title: TableView search in Swift
body: <p>I have two arrays: FirstTableArray (include name of brands) and SecondTableArray (include models).</p>
  
  <p>I want to add search through which the model of phone can be found by part of name.</p>
  
  <pre><code>import UIKit
  import MessageUI
  
  class FirstTableViewController: UITableViewController {
  
      var FirstTableArray = [String]()
      var SecondTableArray = [SecondTable]()
  
  override func viewDidLoad() {
  
      super.viewDidLoad()
  
      self.navigationController?.navigationBar.isTranslucent = false
      self.navigationController?.navigationBar.barStyle = .black
      self.navigationController?.navigationBar.tintColor = UIColor.white
  
  // First Table Array
  
      FirstTableArray = ["Apple", "Samsung"]
  
  // Second Table Array
  
      SecondTableArray = [
      SecondTable(SecondTitle: ["iPhone 5s", "iPhone 6", "iPhone 6s"]),
      SecondTable(SecondTitle: ["Galaxy S4", "Galaxy S5", "Galaxy S6"]), 
      ]   
      }
  
   override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int
      {
      return FirstTableArray.count
      }
  
  override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let Cell = self.tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as UITableViewCell
      Cell.textLabel?.text = FirstTableArray[(indexPath as NSIndexPath).row]
      return Cell
      }
  
  override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
      let indexPath : IndexPath = self.tableView.indexPathForSelectedRow!
      let DestViewController = segue.destination as! SecondTableViewController
      let SecondTableArrayTwo = SecondTableArray[(indexPath as NSIndexPath).row]
      DestViewController.SecondTableArray = SecondTableArrayTwo.SecondTitle
      } 
  }
  </code></pre>
  
  <p>Can you help me with this?</p>