Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let question = questions[indexPath.row]
- if question.questionType == "text_field" {
- if let cell = bookingTableView.dequeueReusableCell(withIdentifier: "formTextInputTableViewCell") as? FormTextInputCell {
- let question = questions[indexPath.row]
- cell.configureCell(question: question, type: "text_field")
- cell.selectionStyle = UITableViewCellSelectionStyle.none
- return cell
- }
- }else if question.questionType == "number_field" {
- if let cell = bookingTableView.dequeueReusableCell(withIdentifier: "formTextInputTableViewCell") as? FormTextInputCell {
- let question = questions[indexPath.row]
- cell.configureCell(question: question, type: "number_field")
- cell.selectionStyle = UITableViewCellSelectionStyle.none
- return cell
- }
- }
- return UITableViewCell()
- }
Add Comment
Please, Sign In to add comment