Advertisement
Guest User

Untitled

a guest
Apr 26th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. //Tableview functions required.
  2. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
  3. //change later
  4. return messages.count
  5. }
  6.  
  7. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
  8. let cell = tableView.dequeueReusableCell(withIdentifier: "MessageCell") as! MessageCell
  9.  
  10. cell.messageLabel.text = messages[indexPath.row].message
  11. cell.usernameLabel.text = messages[indexPath.row].username
  12.  
  13.  
  14. return cell
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement