Guest User

Untitled

a guest
Apr 23rd, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  2.  
  3. let question = questions[indexPath.row]
  4.  
  5. if question.questionType == "text_field" {
  6. if let cell = bookingTableView.dequeueReusableCell(withIdentifier: "formTextInputTableViewCell") as? FormTextInputCell {
  7. let question = questions[indexPath.row]
  8. cell.configureCell(question: question, type: "text_field")
  9. cell.selectionStyle = UITableViewCellSelectionStyle.none
  10. return cell
  11. }
  12. }else if question.questionType == "number_field" {
  13. if let cell = bookingTableView.dequeueReusableCell(withIdentifier: "formTextInputTableViewCell") as? FormTextInputCell {
  14. let question = questions[indexPath.row]
  15. cell.configureCell(question: question, type: "number_field")
  16. cell.selectionStyle = UITableViewCellSelectionStyle.none
  17. return cell
  18. }
  19. }
  20.  
  21. return UITableViewCell()
  22. }
Add Comment
Please, Sign In to add comment