title: How to list the data in the tableview
body: <p>This is the screen shot. According to this how to list the data in the tableview:</p>
  
  <p><img src="https://i.stack.imgur.com/HkJg0.png" alt="image"></p>
  
  <p>Already I have code as below.</p>
  
  <pre><code>func numberOfSections(in tableView: UITableView) -&gt; Int {
        return questionViewModel.numberOfSections()
       }
  func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -&gt; CGFloat {
          return 100
       } func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -&gt; UIView? {
          let identifier = "HeaderCell"
         var headercell: questionheader! = tableView.dequeueReusableCell(withIdentifier: identifier) as? questionheader
          if headercell == nil {
              tableView.register(UINib(nibName: "questionheader", bundle: nil), forCellReuseIdentifier: identifier)
              headercell = tableView.dequeueReusableCell(withIdentifier: identifier) as? NH_questionheader
          }     headercell.setReviewData(reviews:questionViewModel.titleForHeaderInSection(atsection:section))
              headercell.isUserInteractionEnabled = false
          return headercell
  
      }
       func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
           return questionViewModel.numberOfRowsIn(section: section)
       }
  
      func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -&gt; CGFloat {
          let model = questionViewModel.titleForHeaderInSection(atsection: indexPath.section)
          print(model.answerType)
         print(model.answerType?.rawValue)
          let c = model.answerType
          return c!.cellType().getHeight()
      }
  
      func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
           let model = questionViewModel.titleForHeaderInSection(atsection: indexPath.section)
              print(model.answerType)
              print(model.answerType?.rawValue)
              let c = model.answerType
              let cellClass = c?.cellType().getClass()
              print(cellClass)
              let cell = tableView.dequeueReusableCell(withIdentifier: (cellClass?.cellReuseIdentifier())!, for: indexPath) as! BaseCell
              print(cell)
           cell.selectionStyle = .none
   let optionModel = questionViewModel.datafordisplay(atindex: indexPath)
            cell.setOptions(Options1: optionModel)
           cell.delegate = self
          if optionModel.isSelected!
                      {
                      print(optionModel.isSelected)
                      cell.setOptions1(OptionsSelected:optionModel)
          }
           else {
                      print(optionModel.isSelected)
                      cell.setOptions1(OptionsisSelected:optionModel)
           }
          cell.type = c?.cellType()
           print(cell.type)
         else if cell.type == .radiotype{
              cell.selectionStyle = .none
          }
         return cell
     }
  </code></pre>
  
  <p>This is my code. But according to this I will get the output as below screen shot.</p>
  
  <p><img src="https://i.stack.imgur.com/FFBho.png" alt="This is the screen shot"></p>
  
  <p>Actually initially I need to display the section header as: - Please tell about us</p>
  
  <p>After that there is subsection. The subsection questions header are as below: -1. knowledge 2. friendly or not </p>
  
  <p>Then in the subsections display the options. How to do implement?</p>