title: Expanding the expandable table View cells to further extent
body: <p>I created the Expandable table view cells which is like Below mentioned image.
  Library used is <a href="https://www.cocoacontrols.com/controls/jexpandabletableview-e4a8c67b-a9f9-49c9-8794-6b0af256561b" rel="nofollow noreferrer">JExpandableTableView</a>.
  <a href="https://i.stack.imgur.com/ju1lm.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ju1lm.png" alt=""></a></p>
  
  <p>Code for Creating This ExpandableTable View is given below :</p>
  
  <p><strong>Model For Sections:</strong></p>
  
  <pre><code>class SectionInfo: NSObject {
  
      var cells = [CellInfo]()
      var CategoryName: String
      var CategoryCount: String
      var CategoryImage: UIImage
  
      init(_ text: String,SubCount: String, Image: UIImage ) {
  
          self.CategoryName = text
          self.CategoryCount = SubCount
          self.CategoryImage = Image
      }
  }
  </code></pre>
  
  <p><strong>Model For SubCategoryCell:</strong></p>
  
  <pre><code>class CellInfo: NSObject {
  
      var SubcategoryName: String!
      var SubcategoryCount: String!
  
  
      init(_ SubName: String, SubCount: String) {
  
          self.SubcategoryName = SubName
          self.SubcategoryCount = SubCount
      }
  }
  </code></pre>
  
  <p><strong>View Controller :</strong></p>
  
  <pre><code>class CategoryVC: BaseVC,JExpandableTableViewDataSource,JExpandableTableViewDelegate{
  
      @IBOutlet weak var tblViewCategory: JExpandableTableView!
  
      var tableViewData = [SectionInfo]()
      var expandedIndexPath: IndexPath?
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          self.title = "Category"
          self.tblViewCategory.dataSource = self
          self.tblViewCategory.delegate = self
          self.tblViewCategory.keepPreviousCellExpanded = false
  
          self.LoadData()
      }
  
  
      func LoadData() {
  
          var cellInfo = CellInfo("SubCategory 1",SubCount: "10")
  
          let sec1 = SectionInfo("Category 1", SubCount: "5", Image: UIImage(named: "Category3")!)
          sec1.cells.append(cellInfo)
          let sec2 = SectionInfo("Category 2", SubCount: "8", Image: UIImage(named: "Category3")!)
          cellInfo = CellInfo("SubCategory 2",SubCount: "20")
          sec2.cells.append(cellInfo)
          cellInfo = CellInfo("SubCategory 2.1",SubCount: "30")
          sec2.cells.append(cellInfo)
  
          let sec3 = SectionInfo("Category 3", SubCount: "10", Image: UIImage(named: "Category3")!)
          cellInfo = CellInfo("SubCategory 3",SubCount: "30")
          sec3.cells.append(cellInfo)
  
          tableViewData.append(sec1)
          tableViewData.append(sec2)
          tableViewData.append(sec3)
  
  
  
          let celNib = UINib.init(nibName: "SubCategoryCell", bundle: nil)
          tblViewCategory.register(celNib, forCellReuseIdentifier: "SubCategoryCell")
  
          let headerNib = UINib.init(nibName: "HeaderView", bundle: nil)
          tblViewCategory.register(headerNib, forHeaderFooterViewReuseIdentifier: "HeaderView")
      }
  
  
      @IBAction func DrawerMenutap(_ sender: Any) {
  
          self.OpenDrawerMenu()
      }
  
  
      func tableView(_ tableView: JExpandableTableView, numberOfRowsInSection section: Int, callback: @escaping (Int) -&gt; Void) {
  
          let sectionInfo = self.tableViewData[section]
          callback(sectionInfo.cells.count)
      }
  
      func tableView(_ tableView: JExpandableTableView, heightForHeaderInSection section: Int) -&gt; CGFloat {
          return 150
      }
  
      func tableView(_ tableView: JExpandableTableView, heightForRowAtIndexPath indexPath: IndexPath) -&gt; CGFloat {
          return 44
      }
  
      func tableView(_ tableView: JExpandableTableView, initialNumberOfRowsInSection section: Int) -&gt; Int {
  
       //   let sectionInfo = self.tableViewData[section]
          return 0
      }
  
      func numberOfSections(in tableView: JExpandableTableView) -&gt; Int {
          return tableViewData.count
      }
  
      func tableView(_ tableView: JExpandableTableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell{
  
          let section = tableViewData[indexPath.section]
          let row = section.cells[indexPath.row]
  
          let cell = tableView.dequeueReusableCell(withIdentifier: "SubCategoryCell", for: indexPath) as! SubCategoryCell
  
          cell.contentView.backgroundColor = UIColor.white
          cell.lblSubCategoryName.text = row.SubcategoryName
          return cell
      }
  
  
      func tableView(_ tableView: JExpandableTableView, viewForHeaderInSection section: Int) -&gt; UIView? {
  
          let section = self.tableViewData[section]
          let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: "HeaderView") as! HeaderView
          header.contentView.backgroundColor = UIColor.groupTableViewBackground
          header.CatName.text = section.CategoryName
          header.CatImgView.image = UIImage(named: "Category4")
          header.CatCount.text = section.CategoryCount
          return header
      }
  
  
  
  
  }
  
  
  //MARK: Table View Cell for Category
  
  class CatCell: UITableViewCell {
  
      @IBOutlet weak var lblName: UILabel!
  }
  </code></pre>
  
  <p><strong>My further requirement is I want to expand the Cells (Subcategory 2, SubCategory 2.1) in order to accommodate SubSubCategory(Childrens of SubCategory) in Case if they Exist. So what should be the approach for achieving this.</strong></p>