title: fatal error: Index out of range two custom cells
body: <p>I have two custom cells 
  <a href="https://i.stack.imgur.com/Wioxm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Wioxm.png" alt="enter image description here"></a></p>
  
  <p>I configured them like this</p>
  
  <pre><code>func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      if searchActive{
          let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! ShopTableViewCell
          let entry1 = auxiliar?[indexPath.row]
          cell.shopImage.hnk_setImage(from: URL(string: (entry1?.Logo)!))
          cell.shopName.text = entry1?.shopname
  
          cell.backgroundColor = UIColor(white: 1 , alpha : 0.5)
          return cell
      } else {
          if filteredArr == nil {
              let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! ShopTableViewCell
  
              let entry = shops[indexPath.row]
  
              cell.shopImage.hnk_setImage(from: URL(string: entry.Logo))
              cell.shopName.text = entry.shopname
  
              cell.backgroundColor = UIColor(white: 1 , alpha : 0.5)
              return cell
          } else {
              let cell2 = tableView.dequeueReusableCell(withIdentifier: "design", for: indexPath) as! DesignTableViewCell
              let entry2 = filteredArr[indexPath.row]// error here 
  
              cell2.deignImage.hnk_setImage(from: URL(string: "http://jaee.com/upload/img/\(entry2.design)"))
  
              cell2.backgroundColor = UIColor(white: 1 , alpha : 0.5)
              return cell2
          }
      }
  }
  </code></pre>
  
  <p>but I get an error that index out of range. Can someone help me. I think it's because of numberOfRowsInSection</p>
  
  <pre><code>func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
      if searchActive {
          return auxiliar!.count
      }
      return allShops.count
  } 
  </code></pre>
  
  <p>and here is how I save data. I'm filtering the shops. The shops with a design they should be in the <code>design</code> cell and the rest should be in <code>Cell</code>. </p>
  
  <pre><code>var info = Shops(shopname: shopName, Logo: logoString, family_id: familiy_id , design : designImage )
  
  self.shops.append(info)
  self.filteredArr = self.shops.filter { $0.design != nil }
  self.NofilteredArr =  self.shops.filter { $0.design == nil }
  self.allShops = self.NofilteredArr + self.filteredArr
  </code></pre>
  
  <p><strong>UPDATE</strong>
  What I want is the design cell to be on the top only and the Cell is below it. 
  <a href="https://i.stack.imgur.com/gxmZi.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gxmZi.png" alt="enter image description here"></a></p>