Guest User

Untitled

a guest
Jul 23rd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. struct lists {
  2. var title : String!
  3. var description : String!
  4. }
  5.  
  6. var list = Dictionary<String, String>()
  7. var listArray = [lists]()
  8.  
  9. list.updateValue("InquiryNumberCode", forKey: InquiryNumberCode)
  10. list.updateValue("InquiryNumberDescription", forKey: InquiryNumberDescription)
  11. list.updateValue("InquiryNumberValue", forKey: InquiryNumberValue)
  12.  
  13. for (description, title) in list {
  14. print("(title): (description)")
  15. listArray.append(lists(title: title , description: description ))
  16. }
  17.  
  18. override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  19. let cell = tableView.dequeueReusableCell(withIdentifier: "detail", for: indexPath) as! DetailTableViewCell
  20. let celldata = listArray[indexPath.section]
  21. cell.titleOutlet.text = celldata.title[indexPath.row]
  22. return cell
  23. }
Add Comment
Please, Sign In to add comment